Don't use $wgDBservers to get server ip, it isn't set on Wikimedia and return host="" for all db servers
This commit is contained in:
parent
107d1c93f3
commit
f64888e853
1 changed files with 4 additions and 4 deletions
|
|
@ -195,12 +195,12 @@ class ApiQuerySiteinfo extends ApiQueryBase {
|
|||
if ($includeAll) {
|
||||
if (!$wgShowHostnames)
|
||||
$this->dieUsage('Cannot view all servers info unless $wgShowHostnames is true', 'includeAllDenied');
|
||||
|
||||
global $wgDBservers;
|
||||
$lags = wfGetLB()->getLagTimes();
|
||||
|
||||
$lb = wfGetLB();
|
||||
$lags = $lb->getLagTimes();
|
||||
foreach( $lags as $i => $lag ) {
|
||||
$data[] = array (
|
||||
'host' => $wgDBservers[$i]['host'],
|
||||
'host' => $lb->getServerName( $i ),
|
||||
'lag' => $lag);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue