X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialProtectedtitles.php;h=6a94deb52574312b5e2086c39aab44c959ae0762;hb=8a3a8abbb5b3c8e55b6afe915657bc3d18e31d0c;hp=da0a63c79ac3c1ad8c57b6132d005934004ccaa6;hpb=7fbc18e1ba45afbf149f9a848fae094b32daed40;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index da0a63c79a..6a94deb525 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -29,7 +29,7 @@ class SpecialProtectedtitles extends SpecialPage { protected $IdLevel = 'level'; - protected $IdType = 'type'; + protected $IdType = 'type'; public function __construct() { parent::__construct( 'Protectedtitles' ); @@ -113,7 +113,7 @@ class SpecialProtectedtitles extends SpecialPage { * @return string * @private */ - function showOptions( $namespace, $type='edit', $level ) { + function showOptions( $namespace, $type = 'edit', $level ) { global $wgScript; $action = htmlspecialchars( $wgScript ); $title = $this->getTitle(); @@ -161,13 +161,13 @@ class SpecialProtectedtitles extends SpecialPage { // First pass to load the log names foreach( $wgRestrictionLevels as $type ) { - if ( $type !='' && $type !='*') { + if ( $type != '' && $type != '*' ) { $text = $this->msg( "restriction-level-$type" )->text(); $m[$text] = $type; } } // Is there only one level (aside from "all")? - if( count($m) <= 2 ) { + if( count( $m ) <= 2 ) { return ''; } // Third pass generates sorted XHTML content @@ -182,6 +182,10 @@ class SpecialProtectedtitles extends SpecialPage { array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ), implode( "\n", $options ) ); } + + protected function getGroupName() { + return 'maintenance'; + } } /** @@ -191,7 +195,7 @@ class SpecialProtectedtitles extends SpecialPage { class ProtectedTitlesPager extends AlphabeticPager { public $mForm, $mConds; - function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0 ) { + function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0 ) { $this->mForm = $form; $this->mConds = $conds; $this->level = $level; @@ -234,7 +238,7 @@ class ProtectedTitlesPager extends AlphabeticPager { $conds[] = 'pt_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() ); if( $this->level ) $conds['pt_create_perm'] = $this->level; - if( !is_null($this->namespace) ) + if( !is_null( $this->namespace ) ) $conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace ); return array( 'tables' => 'protected_titles',