Implemented param tracking for hook users, feels a bit hackish
[lhc/web/wiklou.git] / includes / OutputPage.php
index 34eac1e..2470d62 100644 (file)
@@ -792,7 +792,7 @@ class OutputPage {
         * @param $t Title object
         */
        public function setTitle( $t ) {
-               $this->getContext()->setTitle($t);
+               $this->getContext()->setTitle( $t );
        }
 
        /**
@@ -2158,16 +2158,7 @@ class OutputPage {
         * for when rate limiting has triggered.
         */
        public function rateLimited() {
-               $this->setPageTitle( wfMsg( 'actionthrottled' ) );
-               $this->setRobotPolicy( 'noindex,follow' );
-               $this->setArticleRelated( false );
-               $this->enableClientCache( false );
-               $this->mRedirect = '';
-               $this->clearHTML();
-               $this->setStatusCode( 503 );
-               $this->addWikiMsg( 'actionthrottledtext' );
-
-               $this->returnToMain( null, $this->getTitle() );
+               throw new ThrottledError;
        }
 
        /**
@@ -2190,27 +2181,6 @@ class OutputPage {
                }
        }
 
-       /**
-        * Adds JS-based password security checker
-        * @param $passwordId String ID of input box containing password
-        * @param $retypeId String ID of input box containing retyped password
-        * @return none
-        */
-       public function addPasswordSecurity( $passwordId, $retypeId ) {
-               $data = array(
-                       'password' => '#' . $passwordId,
-                       'retype' => '#' . $retypeId,
-                       'messages' => array(),
-               );
-               foreach ( array( 'password-strength', 'password-strength-bad', 'password-strength-mediocre',
-                               'password-strength-acceptable', 'password-strength-good', 'password-retype', 'password-retype-mismatch'
-                       ) as $message ) {
-                       $data['messages'][$message] = wfMsg( $message );
-               }
-               $this->addScript( Html::inlineScript( 'var passwordSecurity=' . FormatJson::encode( $data ) ) );
-               $this->addModules( 'mediawiki.legacy.password' );
-       }
-
        public function showFatalError( $message ) {
                $this->setPageTitle( wfMsg( 'internalerror' ) );
                $this->setRobotPolicy( 'noindex,nofollow' );
@@ -2673,8 +2643,7 @@ class OutputPage {
                $ns = $title->getNamespace();
                $nsname = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $title->getNsText();
                if ( $ns == NS_SPECIAL ) {
-                       $parts = SpecialPage::resolveAliasWithSubpage( $title->getDBkey() );
-                       $canonicalName = $parts[0];
+                       list( $canonicalName, /*...*/ ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
                } else {
                        $canonicalName = false; # bug 21115
                }