http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89794

Revision: 89794
Author:   ialex
Date:     2011-06-09 20:00:40 +0000 (Thu, 09 Jun 2011)
Log Message:
-----------
Recommit SpecialPage.php and SpecialPageFactory.php parts of r89406 (removal of 
magic __get() accessor for RequestContext)

Modified Paths:
--------------
    trunk/phase3/includes/SpecialPage.php
    trunk/phase3/includes/SpecialPageFactory.php

Modified: trunk/phase3/includes/SpecialPage.php
===================================================================
--- trunk/phase3/includes/SpecialPage.php       2011-06-09 19:58:30 UTC (rev 
89793)
+++ trunk/phase3/includes/SpecialPage.php       2011-06-09 20:00:40 UTC (rev 
89794)
@@ -856,14 +856,14 @@
                // Redirect to a page title with possible query parameters
                if ( $redirect instanceof Title ) {
                        $url = $redirect->getFullUrl( $query );
-                       $this->getContext()->output->redirect( $url );
+                       $this->getOutput()->redirect( $url );
                        wfProfileOut( __METHOD__ );
                        return $redirect;
                // Redirect to index.php with query parameters
                } elseif ( $redirect === true ) {
                        global $wgScript;
                        $url = $wgScript . '?' . wfArrayToCGI( $query );
-                       $this->getContext()->output->redirect( $url );
+                       $this->getOutput()->redirect( $url );
                        wfProfileOut( __METHOD__ );
                        return $redirect;
                } else {

Modified: trunk/phase3/includes/SpecialPageFactory.php
===================================================================
--- trunk/phase3/includes/SpecialPageFactory.php        2011-06-09 19:58:30 UTC 
(rev 89793)
+++ trunk/phase3/includes/SpecialPageFactory.php        2011-06-09 20:00:40 UTC 
(rev 89794)
@@ -417,10 +417,10 @@
                $page = self::getPage( $name );
                // Nonexistent?
                if ( !$page ) {
-                       $context->output->setArticleRelated( false );
-                       $context->output->setRobotPolicy( 'noindex,nofollow' );
-                       $context->output->setStatusCode( 404 );
-                       $context->output->showErrorPage( 'nosuchspecialpage', 
'nospecialpagetext' );
+                       $context->getOutput()->setArticleRelated( false );
+                       $context->getOutput()->setRobotPolicy( 
'noindex,nofollow' );
+                       $context->getOutput()->setStatusCode( 404 );
+                       $context->getOutput()->showErrorPage( 
'nosuchspecialpage', 'nospecialpagetext' );
                        wfProfileOut( __METHOD__ );
                        return false;
                }
@@ -434,17 +434,17 @@
                        // the request. Such POST requests are possible for old 
extensions that
                        // generate self-links without being aware that their 
default name has
                        // changed.
-                       if ( $name != $page->getLocalName() && 
!$context->request->wasPosted() ) {
-                               $query = $context->request->getQueryValues();
+                       if ( $name != $page->getLocalName() && 
!$context->getRequest()->wasPosted() ) {
+                               $query = 
$context->getRequest()->getQueryValues();
                                unset( $query['title'] );
                                $query = wfArrayToCGI( $query );
                                $title = $page->getTitle( $par );
                                $url = $title->getFullUrl( $query );
-                               $context->output->redirect( $url );
+                               $context->getOutput()->redirect( $url );
                                wfProfileOut( __METHOD__ );
                                return $title;
                        } else {
-                               $context->title = $page->getTitle();
+                               $context->setTitle( $page->getTitle() );
                        }
 
                } elseif ( !$page->isIncludable() ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to