Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -195,12 +195,12 @@ |
196 | 196 | if ($includeAll) { |
197 | 197 | if (!$wgShowHostnames) |
198 | 198 | $this->dieUsage('Cannot view all servers info unless $wgShowHostnames is true', 'includeAllDenied'); |
199 | | - |
200 | | - global $wgDBservers; |
201 | | - $lags = wfGetLB()->getLagTimes(); |
| 199 | + |
| 200 | + $lb = wfGetLB(); |
| 201 | + $lags = $lb->getLagTimes(); |
202 | 202 | foreach( $lags as $i => $lag ) { |
203 | 203 | $data[] = array ( |
204 | | - 'host' => $wgDBservers[$i]['host'], |
| 204 | + 'host' => $lb->getServerName( $i ), |
205 | 205 | 'lag' => $lag); |
206 | 206 | } |
207 | 207 | } else { |