X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialProtectedtitles.php;h=5b18d87f3bd44ba4de696ef8e6ced97f38e1d807;hb=a23d2475aafd0956a30549cbfff25f0c2e7a837e;hp=2fab586ef24c18ec8585c6fa503ec249ecabaae7;hpb=fff5f0ee0b7aa4adf2b0eb96f3cbed491e692547;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 2fab586ef2..5b18d87f3b 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -26,17 +26,20 @@ * * @ingroup SpecialPage */ -class ProtectedTitlesForm { +class SpecialProtectedtitles extends SpecialPage { protected $IdLevel = 'level'; protected $IdType = 'type'; - function showList( $msg = '' ) { + public function __construct() { + parent::__construct( 'Protectedtitles' ); + } + + function execute( $par ) { global $wgOut, $wgRequest; - if ( $msg != "" ) { - $wgOut->setSubtitle( $msg ); - } + $this->setHeaders(); + $this->outputHeader(); // Purge expired entries on one in every 10 queries if ( !mt_rand( 0, 10 ) ) { @@ -51,7 +54,7 @@ class ProtectedTitlesForm { $pager = new ProtectedTitlesPager( $this, array(), $type, $level, $NS, $sizetype, $size ); - $wgOut->addHTML( $this->showOptions( $NS, $type, $level, $sizetype, $size ) ); + $wgOut->addHTML( $this->showOptions( $NS, $type, $level ) ); if ( $pager->getNumRows() ) { $s = $pager->getNavigationBar(); @@ -87,7 +90,7 @@ class ProtectedTitlesForm { $description_items[] = $protType; - $expiry_description = ''; $stxt = ''; + $stxt = ''; if ( $row->pt_expiry != 'infinity' && strlen($row->pt_expiry) ) { $expiry = Block::decodeExpiry( $row->pt_expiry ); @@ -106,11 +109,9 @@ class ProtectedTitlesForm { * @param $namespace Integer: * @param $type string * @param $level string - * @param $sizetype Unused - * @param $size Unused * @private */ - function showOptions( $namespace, $type='edit', $level, $sizetype, $size ) { + function showOptions( $namespace, $type='edit', $level ) { global $wgScript; $action = htmlspecialchars( $wgScript ); $title = SpecialPage::getTitleFor( 'Protectedtitles' ); @@ -118,7 +119,7 @@ class ProtectedTitlesForm { return "