trim $this->mUserName var so that login attempt throttle key isn't fragmented with...
[lhc/web/wiklou.git] / includes / specials / SpecialRandompage.php
index 4e3febe..e299dc7 100644 (file)
@@ -65,7 +65,7 @@ class RandomPage extends SpecialPage {
 
                if( is_null( $title ) ) {
                        $this->setHeaders();
-                       $wgOut->addWikiMsg( strtolower( $this->mName ) . '-nopages', 
+                       $wgOut->addWikiMsg( strtolower( $this->mName ) . '-nopages',
                                $this->getNsList(), count( $this->namespaces ) );
                        return;
                }
@@ -86,7 +86,7 @@ class RandomPage extends SpecialPage {
                $nsNames = array();
                foreach( $this->namespaces as $n ) {
                        if( $n === NS_MAIN ) {
-                               $nsNames[] = wfMsgForContent( 'blanknamespace' );
+                               $nsNames[] = wfMsgNoTrans( 'blanknamespace' );
                        } else {
                                $nsNames[] = $wgContLang->getNsText( $n );
                        }
@@ -126,16 +126,8 @@ class RandomPage extends SpecialPage {
        }
 
        protected function getQueryInfo( $randstr ) {
-               global $wgExtraRandompageSQL;
                $redirect = $this->isRedirect() ? 1 : 0;
 
-               if ( $wgExtraRandompageSQL ) {
-                       $this->extra[] = $wgExtraRandompageSQL;
-               }
-               if ( $this->addExtraSQL() ) {
-                       $this->extra[] = $this->addExtraSQL();
-               }
-
                return array(
                        'tables' => array( 'page' ),
                        'fields' => array( 'page_title', 'page_namespace' ),
@@ -168,12 +160,4 @@ class RandomPage extends SpecialPage {
 
                return $dbr->fetchObject( $res );
        }
-
-       /* an alternative to $wgExtraRandompageSQL so subclasses
-        * can add their own SQL by overriding this function
-        * @deprecated, append to $this->extra instead
-        */
-       public function addExtraSQL() {
-               return '';
-       }
 }