r90260 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90259‎ | r90260 | r90261 >
Date:10:07, 17 June 2011
Author:reedy
Status:ok
Tags:
Comment:
(29 lines skipped) [17-Jun-2011 10:03:59] PHP Notice: Use of RequestContext::__get() is deprecated; use $context->getFoo() instead is deprecated. [Called from MediaWiki::parseTitle in /www/w/includes/Wiki.php at line 36] in /www/w/includes/GlobalFunctions.php on line 3342


Swap $this->context->request to $this->context->getRequest()
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -33,10 +33,11 @@
3434 private function parseTitle() {
3535 global $wgContLang;
3636
37 - $curid = $this->context->request->getInt( 'curid' );
38 - $title = $this->context->request->getVal( 'title' );
 37+ $request = $this->context->getRequest();
 38+ $curid = $request->getInt( 'curid' );
 39+ $title = $request->getVal( 'title' );
3940
40 - if ( $this->context->request->getCheck( 'search' ) ) {
 41+ if ( $request->getCheck( 'search' ) ) {
4142 // Compatibility with old search URLs which didn't use Special:Search
4243 // Just check for presence here, so blank requests still
4344 // show the search page when using ugly URLs (bug 8054).
@@ -57,8 +58,8 @@
5859 // For non-special titles, check for implicit titles
5960 if ( is_null( $ret ) || $ret->getNamespace() != NS_SPECIAL ) {
6061 // We can have urls with just ?diff=,?oldid= or even just ?diff=
61 - $oldid = $this->context->request->getInt( 'oldid' );
62 - $oldid = $oldid ? $oldid : $this->context->request->getInt( 'diff' );
 62+ $oldid = $request->getInt( 'oldid' );
 63+ $oldid = $oldid ? $oldid : $request->getInt( 'diff' );
6364 // Allow oldid to override a changed or missing title
6465 if ( $oldid ) {
6566 $rev = Revision::newFromId( $oldid );
@@ -344,7 +345,7 @@
345346 } else {
346347 $n = intval( $wgJobRunRate );
347348 }
348 -
 349+
349350 // Close the session so that jobs don't access the current session
350351 $this->shutdownLBFactory();
351352 session_write_close();
@@ -375,7 +376,7 @@
376377 }
377378
378379 /**
379 - * Commit pending master changes, shutdown the current loadbalancer
 380+ * Commit pending master changes, shutdown the current loadbalancer
380381 * factory and destroys the factory instance.
381382 */
382383 private function shutdownLBFactory() {

Status & tagging log