Index: trunk/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -42,8 +42,10 @@ |
43 | 43 | public function execute() { |
44 | 44 | $params = $this->extractRequestParams(); |
45 | 45 | |
| 46 | + global $wgLang; |
| 47 | + |
46 | 48 | if ( !is_null( $params['lang'] ) ) { |
47 | | - global $wgLang; |
| 49 | + $oldLang = $wgLang; //Keep $wgLang for restore later |
48 | 50 | $wgLang = Language::factory( $params['lang'] ); |
49 | 51 | } |
50 | 52 | |
— | — | @@ -120,6 +122,10 @@ |
121 | 123 | } |
122 | 124 | } |
123 | 125 | $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'message' ); |
| 126 | + |
| 127 | + if ( !is_null( $params['lang'] ) ) { |
| 128 | + $wgLang = $oldLang; //Restore $oldLang |
| 129 | + } |
124 | 130 | } |
125 | 131 | |
126 | 132 | public function getAllowedParams() { |