Use local context instead of global variables
[lhc/web/wiklou.git] / includes / specials / SpecialAllmessages.php
index f457c95..8f41c82 100644 (file)
@@ -92,11 +92,6 @@ class AllmessagesTablePager extends TablePager {
 
        public $mLimitsShown;
 
-       /**
-        * @var Skin
-        */
-       protected $mSkin;
-
        /**
         * @var Language
         */
@@ -138,7 +133,6 @@ class AllmessagesTablePager extends TablePager {
                        $this->displayPrefix = false;
                        $this->prefix = false;
                }
-               $this->getSkin();
 
                // The suffix that may be needed for message names if we're in a
                // different language (eg [[MediaWiki:Foo/fr]]: $suffix = '/fr'
@@ -164,7 +158,7 @@ class AllmessagesTablePager extends TablePager {
                                        Xml::label( wfMsg( 'allmessages-prefix' ), 'mw-allmessages-form-prefix' ) .
                                "</td>\n
                                <td class=\"mw-input\">" .
-                                       Xml::input( 'prefix', 20, str_replace( '_', ' ', $this->prefix ), array( 'id' => 'mw-allmessages-form-prefix' ) ) .
+                                       Xml::input( 'prefix', 20, str_replace( '_', ' ', $this->displayPrefix ), array( 'id' => 'mw-allmessages-form-prefix' ) ) .
                                "</td>\n
                        </tr>
                        <tr>\n
@@ -351,9 +345,9 @@ class AllmessagesTablePager extends TablePager {
                                $talk  = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix );
 
                                if( $this->mCurrentRow->am_customised ){
-                                       $title = $this->mSkin->linkKnown( $title, $wgLang->lcfirst( $value ) );
+                                       $title = Linker::linkKnown( $title, $wgLang->lcfirst( $value ) );
                                } else {
-                                       $title = $this->mSkin->link(
+                                       $title = Linker::link(
                                                $title,
                                                $wgLang->lcfirst( $value ),
                                                array(),
@@ -362,9 +356,9 @@ class AllmessagesTablePager extends TablePager {
                                        );
                                }
                                if ( $this->mCurrentRow->am_talk_exists ) {
-                                       $talk = $this->mSkin->linkKnown( $talk , $this->talk );
+                                       $talk = Linker::linkKnown( $talk , $this->talk );
                                } else {
-                                       $talk = $this->mSkin->link(
+                                       $talk = Linker::link(
                                                $talk,
                                                $this->talk,
                                                array(),
@@ -411,8 +405,7 @@ class AllmessagesTablePager extends TablePager {
        }
 
        function getCellAttrs( $field, $value ){
-               global $wgBetterDirectionality;
-               if( $field != 'am_title' && $wgBetterDirectionality ) {
+               if( $field != 'am_title' ) {
                        return array( 'lang' => $this->langcode, 'dir' => $this->lang->getDir() );
                } elseif( $this->mCurrentRow->am_customised && $field == 'am_title' ) {
                        return array( 'rowspan' => '2', 'class' => $field );