Introduce Language::getMessageKeysFor() and use it in ApiQueryAllmessages
[lhc/web/wiklou.git] / includes / specials / SpecialProtectedpages.php
index 8395964..2145108 100644 (file)
@@ -76,14 +76,14 @@ class SpecialProtectedpages extends SpecialPage {
         * @return string Formatted <li> element
         */
        public function formatRow( $row ) {
-               global $wgUser, $wgLang, $wgContLang;
+               global $wgUser, $wgLang;
 
                wfProfileIn( __METHOD__ );
 
                static $skin = null, $infinity = null;
 
                if( is_null( $skin ) ){
-                       $skin = $wgUser->getSkin();
+                       $skin = $this->getSkin();
                        $infinity = wfGetDB( DB_SLAVE )->getInfinity();
                }
 
@@ -106,17 +106,17 @@ class SpecialProtectedpages extends SpecialPage {
                if( $expiry != $infinity ) {
 
                        $expiry_description = wfMsg(
-                               'protect-expiring',
-                               $wgLang->timeanddate( $expiry ),
-                               $wgLang->date( $expiry ),
-                               $wgLang->time( $expiry )
+                               'protect-expiring-local',
+                               $wgLang->timeanddate( $expiry, true ),
+                               $wgLang->date( $expiry, true ),
+                               $wgLang->time( $expiry, true )
                        );
 
                        $description_items[] = htmlspecialchars($expiry_description);
                }
 
                if(!is_null($size = $row->page_len)) {
-                       $stxt = $wgContLang->getDirMark() . ' ' . $skin->formatRevisionSize( $size );
+                       $stxt = $wgLang->getDirMark() . ' ' . $skin->formatRevisionSize( $size );
                }
 
                # Show a link to the change protection form for allowed users otherwise a link to the protection log
@@ -145,7 +145,7 @@ class SpecialProtectedpages extends SpecialPage {
                return Html::rawElement(
                        'li',
                        array(),
-                       wfSpecialList( $link . $stxt, $wgLang->commaList( $description_items ) ) . $changeProtection ) . "\n";
+                       wfSpecialList( $link . $stxt, $wgLang->commaList( $description_items ), false ) . $changeProtection ) . "\n";
        }
 
        /**
@@ -319,6 +319,10 @@ class ProtectedPagesPager extends AlphabeticPager {
                return '';
        }
 
+       function getTitle() {
+               return SpecialPage::getTitleFor( 'Protectedpages' );
+       }
+
        function formatRow( $row ) {
                return $this->mForm->formatRow( $row );
        }
@@ -332,7 +336,7 @@ class ProtectedPagesPager extends AlphabeticPager {
 
                if( $this->sizetype=='min' ) {
                        $conds[] = 'page_len>=' . $this->size;
-               } else if( $this->sizetype=='max' ) {
+               } elseif( $this->sizetype=='max' ) {
                        $conds[] = 'page_len<=' . $this->size;
                }