Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -99,37 +99,38 @@ |
100 | 100 | } |
101 | 101 | |
102 | 102 | protected function appendGeneralInfo( $property ) { |
103 | | - global $wgSitename, $wgVersion, $wgCapitalLinks, $wgRightsCode, $wgRightsText, $wgContLang; |
104 | | - global $wgLanguageCode, $IP, $wgEnableWriteAPI, $wgLang, $wgLocaltimezone, $wgLocalTZoffset; |
| 103 | + global $wgContLang; |
| 104 | + global $wgLang; |
105 | 105 | |
106 | 106 | $data = array(); |
107 | 107 | $mainPage = Title :: newFromText(wfMsgForContent('mainpage')); |
108 | 108 | $data['mainpage'] = $mainPage->getPrefixedText(); |
109 | 109 | $data['base'] = $mainPage->getFullUrl(); |
110 | | - $data['sitename'] = $wgSitename; |
111 | | - $data['generator'] = "MediaWiki $wgVersion"; |
| 110 | + $data['sitename'] = $GLOBALS['wgSitename']; |
| 111 | + $data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}"; |
112 | 112 | |
113 | | - $svn = SpecialVersion::getSvnRevision( $IP ); |
| 113 | + $svn = SpecialVersion::getSvnRevision( $GLOBALS['IP'] ); |
114 | 114 | if( $svn ) |
115 | 115 | $data['rev'] = $svn; |
116 | 116 | |
117 | | - $data['case'] = $wgCapitalLinks ? 'first-letter' : 'case-sensitive'; // 'case-insensitive' option is reserved for future |
| 117 | + // 'case-insensitive' option is reserved for future |
| 118 | + $data['case'] = $GLOBALS['wgCapitalLinks'] ? 'first-letter' : 'case-sensitive'; |
118 | 119 | |
119 | | - if( isset( $wgRightsCode ) ) |
120 | | - $data['rightscode'] = $wgRightsCode; |
121 | | - $data['rights'] = $wgRightsText; |
122 | | - $data['lang'] = $wgLanguageCode; |
| 120 | + if( isset( $GLOBALS['wgRightsCode'] ) ) |
| 121 | + $data['rightscode'] = $GLOBALS['wgRightsCode']; |
| 122 | + $data['rights'] = $GLOBALS['wgRightsText']; |
| 123 | + $data['lang'] = $GLOBALS['wgLanguageCode']; |
123 | 124 | if( $wgContLang->isRTL() ) |
124 | 125 | $data['rtl'] = ''; |
125 | 126 | $data['fallback8bitEncoding'] = $wgLang->fallback8bitEncoding(); |
126 | 127 | |
127 | 128 | if( wfReadOnly() ) |
128 | 129 | $data['readonly'] = ''; |
129 | | - if( $wgEnableWriteAPI ) |
| 130 | + if( $GLOBALS['wgEnableWriteAPI'] ) |
130 | 131 | $data['writeapi'] = ''; |
131 | 132 | |
132 | | - $tz = $wgLocaltimezone; |
133 | | - $offset = $wgLocalTZoffset; |
| 133 | + $tz = $GLOBALS['wgLocaltimezone']; |
| 134 | + $offset = $GLOBALS['wgLocalTZoffset']; |
134 | 135 | if( is_null( $tz ) ) { |
135 | 136 | $tz = 'UTC'; |
136 | 137 | $offset = 0; |
— | — | @@ -138,6 +139,12 @@ |
139 | 140 | } |
140 | 141 | $data['timezone'] = $tz; |
141 | 142 | $data['timeoffset'] = intval($offset); |
| 143 | + $data['articlepath'] = $GLOBALS['wgArticlePath']; |
| 144 | + $data['scriptpath'] = $GLOBALS['wgScriptPath']; |
| 145 | + $data['script'] = $GLOBALS['wgScript']; |
| 146 | + $data['variantarticlepath'] = $GLOBALS['wgVariantArticlePath']; |
| 147 | + $data['server'] = $GLOBALS['wgServer']; |
| 148 | + $data['wikiid'] = wfWikiID(); |
142 | 149 | |
143 | 150 | return $this->getResult()->addValue( 'query', $property, $data ); |
144 | 151 | } |
— | — | @@ -441,4 +448,4 @@ |
442 | 449 | public function getVersion() { |
443 | 450 | return __CLASS__ . ': $Id$'; |
444 | 451 | } |
445 | | -} |
\ No newline at end of file |
| 452 | +} |