Merge "Language: s/error_log/wfWarn/"
[lhc/web/wiklou.git] / includes / specials / SpecialProtectedpages.php
index 7554e37..0ba7385 100644 (file)
@@ -79,11 +79,7 @@ class SpecialProtectedpages extends SpecialPage {
                ) );
 
                if ( $pager->getNumRows() ) {
-                       $this->getOutput()->addHTML(
-                               $pager->getNavigationBar() .
-                                       $pager->getBody() .
-                                       $pager->getNavigationBar()
-                       );
+                       $this->getOutput()->addParserOutputContent( $pager->getFullOutput() );
                } else {
                        $this->getOutput()->addWikiMsg( 'protectedpagesempty' );
                }
@@ -103,11 +99,9 @@ class SpecialProtectedpages extends SpecialPage {
        protected function showOptions( $namespace, $type = 'edit', $level, $sizetype,
                $size, $indefOnly, $cascadeOnly, $noRedirect
        ) {
-               global $wgScript;
-
                $title = $this->getPageTitle();
 
-               return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
+               return Xml::openElement( 'form', array( 'method' => 'get', 'action' => wfScript() ) ) .
                        Xml::openElement( 'fieldset' ) .
                        Xml::element( 'legend', array(), $this->msg( 'protectedpages' )->text() ) .
                        Html::hidden( 'title', $title->getPrefixedDBkey() ) . "\n" .
@@ -252,14 +246,12 @@ class SpecialProtectedpages extends SpecialPage {
         * @return string Formatted HTML
         */
        protected function getLevelMenu( $pr_level ) {
-               global $wgRestrictionLevels;
-
                // Temporary array
                $m = array( $this->msg( 'restriction-level-all' )->text() => 0 );
                $options = array();
 
                // First pass to load the log names
-               foreach ( $wgRestrictionLevels as $type ) {
+               foreach ( $this->getConfig()->get( 'RestrictionLevels' ) as $type ) {
                        // Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed'
                        if ( $type != '' && $type != '*' ) {
                                $text = $this->msg( "restriction-level-$type" )->text();
@@ -562,7 +554,7 @@ class ProtectedPagesPager extends TablePager {
        }
 
        public function getTableClass() {
-               return 'TablePager mw-protectedpages';
+               return parent::getTableClass() . ' mw-protectedpages';
        }
 
        function getIndexField() {