Index: trunk/phase3/maintenance/rebuildFileCache.php |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | $this->output( "Page {$row->page_id} has bad title\n" ); |
81 | 81 | continue; // broken title? |
82 | 82 | } |
83 | | - $wgOut = $context->output; // set display title |
| 83 | + $wgOut = $context->getOutput(); // set display title |
84 | 84 | $article = new Article( $wgTitle ); |
85 | 85 | // If the article is cacheable, then load it |
86 | 86 | if ( $article->isFileCacheable() ) { |
Index: trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php |
— | — | @@ -79,8 +79,8 @@ |
80 | 80 | // $tmpGlobals['wgContLang'] = new StubContLang; |
81 | 81 | $tmpGlobals['wgUser'] = new User; |
82 | 82 | $context = new RequestContext(); |
83 | | - $tmpGlobals['wgLang'] = $context->lang; |
84 | | - $tmpGlobals['wgOut'] = $context->output; |
| 83 | + $tmpGlobals['wgLang'] = $context->getLang(); |
| 84 | + $tmpGlobals['wgOut'] = $context->getOutput(); |
85 | 85 | $tmpGlobals['wgParser'] = new StubObject( 'wgParser', $GLOBALS['wgParserConf']['class'], array( $GLOBALS['wgParserConf'] ) ); |
86 | 86 | $tmpGlobals['wgRequest'] = new WebRequest; |
87 | 87 | |
— | — | @@ -312,10 +312,10 @@ |
313 | 313 | $langObj = Language::factory( $lang ); |
314 | 314 | $GLOBALS['wgContLang'] = $langObj; |
315 | 315 | $context = new RequestContext(); |
316 | | - $GLOBALS['wgLang'] = $context->lang; |
| 316 | + $GLOBALS['wgLang'] = $context->getLang(); |
317 | 317 | |
318 | 318 | $GLOBALS['wgMemc'] = new EmptyBagOStuff; |
319 | | - $GLOBALS['wgOut'] = $context->output; |
| 319 | + $GLOBALS['wgOut'] = $context->getOutput(); |
320 | 320 | |
321 | 321 | global $wgHooks; |
322 | 322 | |
Index: trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php |
— | — | @@ -49,8 +49,8 @@ |
50 | 50 | // $wgContLang = new StubContLang; |
51 | 51 | $wgUser = new User; |
52 | 52 | $context = new RequestContext; |
53 | | - $wgLang = $context->lang; |
54 | | - $wgOut = $context->output; |
| 53 | + $wgLang = $context->getLang(); |
| 54 | + $wgOut = $context->getOutput(); |
55 | 55 | $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) ); |
56 | 56 | $wgRequest = new WebRequest; |
57 | 57 | |
Index: trunk/phase3/includes/RequestContext.php |
— | — | @@ -219,6 +219,7 @@ |
220 | 220 | * @return string |
221 | 221 | */ |
222 | 222 | public function __get( $name ) { |
| 223 | + wfDeprecated( 'RequestContext::__get() is deprecated; use $context->getFoo() instead' ); |
223 | 224 | if ( in_array( $name, array( 'request', 'title', 'output', 'user', 'lang', 'skin' ) ) ) { |
224 | 225 | $fname = 'get' . ucfirst( $name ); |
225 | 226 | return $this->$fname(); |
— | — | @@ -232,6 +233,7 @@ |
233 | 234 | * @return string |
234 | 235 | */ |
235 | 236 | public function __set( $name, $value ) { |
| 237 | + wfDeprecated( 'RequestContext::__set() is deprecated; use $context->setFoo() instead' ); |
236 | 238 | if ( in_array( $name, array( 'request', 'title', 'output', 'user', 'lang', 'skin' ) ) ) { |
237 | 239 | $fname = 'set' . ucfirst( $name ); |
238 | 240 | return $this->$fname( $value ); |
Index: trunk/phase3/includes/actions/DeleteAction.php |
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | $data['Reason'] = (array)$data['Reason']; |
238 | 238 | |
239 | 239 | $error = null; |
240 | | - if ( !wfRunHooks( 'ArticleDelete', array( &$page, &$context->user, &$data['Reason'][0], &$error ) ) ) { |
| 240 | + if ( !wfRunHooks( 'ArticleDelete', array( &$page, $context->getUser(), &$data['Reason'][0], &$error ) ) ) { |
241 | 241 | return $error; |
242 | 242 | } |
243 | 243 | |
— | — | @@ -376,7 +376,7 @@ |
377 | 377 | $dbw->commit(); |
378 | 378 | } |
379 | 379 | |
380 | | - wfRunHooks( 'ArticleDeleteComplete', array( &$page, &$context->user, $data['Reason'][0], $id ) ); |
| 380 | + wfRunHooks( 'ArticleDeleteComplete', array( &$page, $context->getUser(), $data['Reason'][0], $id ) ); |
381 | 381 | return true; |
382 | 382 | } |
383 | 383 | |
Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -244,22 +244,22 @@ |
245 | 245 | |
246 | 246 | if ( isset( $prop['headitems'] ) || isset( $prop['headhtml'] ) ) { |
247 | 247 | $context = new RequestContext; |
248 | | - $context->output->addParserOutputNoText( $p_result ); |
| 248 | + $context->getOutput()->addParserOutputNoText( $p_result ); |
249 | 249 | |
250 | 250 | if ( isset( $prop['headitems'] ) ) { |
251 | 251 | $headItems = $this->formatHeadItems( $p_result->getHeadItems() ); |
252 | 252 | |
253 | | - $context->skin->setupUserCss( $context->output ); |
254 | | - $css = $this->formatCss( $context->output->buildCssLinksArray() ); |
| 253 | + $context->getSkin()->setupUserCss( $context->getOutput() ); |
| 254 | + $css = $this->formatCss( $context->getOutput()->buildCssLinksArray() ); |
255 | 255 | |
256 | | - $scripts = array( $context->output->getHeadScripts( $context->skin ) ); |
| 256 | + $scripts = array( $context->getOutput()->getHeadScripts( $context->getSkin() ) ); |
257 | 257 | |
258 | 258 | $result_array['headitems'] = array_merge( $headItems, $css, $scripts ); |
259 | 259 | } |
260 | 260 | |
261 | 261 | if ( isset( $prop['headhtml'] ) ) { |
262 | 262 | $result_array['headhtml'] = array(); |
263 | | - $result->setContent( $result_array['headhtml'], $context->output->headElement( $context->skin ) ); |
| 263 | + $result->setContent( $result_array['headhtml'], $context->getOutput()->headElement( $context->getSkin() ) ); |
264 | 264 | } |
265 | 265 | } |
266 | 266 | |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -873,8 +873,8 @@ |
874 | 874 | $params = array(); |
875 | 875 | |
876 | 876 | foreach( $this->mAllowedRedirectParams as $arg ) { |
877 | | - if( $this->getContext()->request->getVal( $arg, null ) !== null ){ |
878 | | - $params[$arg] = $this->getContext()->request->getVal( $arg ); |
| 877 | + if( $this->getRequest()->getVal( $arg, null ) !== null ){ |
| 878 | + $params[$arg] = $this->getRequest()->getVal( $arg ); |
879 | 879 | } |
880 | 880 | } |
881 | 881 | |