repo.or.cz
/
mediawiki.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* Add a h2 header to the begin of the results
[mediawiki.git]
/
maintenance
/
getSlaveServer.php
blob
d148557bf269315dd2642bf509cf722e07e04a70
1
<
?php
2
/**
3
* @file
4
* @ingroup Maintenance
5
*/
6
7
require_once
(
dirname
(
__FILE__
).
'/commandLine.inc'
);
8
9
if
(
isset
(
$options
[
'group'
] ) ) {
10
$db
=
wfGetDB
(
DB_SLAVE
,
$options
[
'group'
] );
11
$host
=
$db
->
getServer
();
12
}
else
{
13
$lb
=
wfGetLB
();
14
$i
=
$lb
->
getReaderIndex
();
15
$host
=
$lb
->
getServerName
(
$i
);
16
}
17
18
print
"
$host\n
"
;
19
20