summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialBlockList.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialBlockList.php')
-rw-r--r--includes/specials/SpecialBlockList.php34
1 files changed, 19 insertions, 15 deletions
diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php
index 7143d5bc..e10df4fe 100644
--- a/includes/specials/SpecialBlockList.php
+++ b/includes/specials/SpecialBlockList.php
@@ -37,7 +37,7 @@ class SpecialBlockList extends SpecialPage {
/**
* Main execution point
*
- * @param $par String title fragment
+ * @param string $par title fragment
*/
public function execute( $par ) {
$this->setHeaders();
@@ -113,14 +113,14 @@ class SpecialBlockList extends SpecialPage {
$conds = array();
# Is the user allowed to see hidden blocks?
- if ( !$this->getUser()->isAllowed( 'hideuser' ) ){
+ if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
$conds['ipb_deleted'] = 0;
}
- if ( $this->target !== '' ){
+ if ( $this->target !== '' ) {
list( $target, $type ) = Block::parseTarget( $this->target );
- switch( $type ){
+ switch( $type ) {
case Block::TYPE_ID:
case Block::TYPE_AUTO:
$conds['ipb_id'] = $target;
@@ -205,6 +205,10 @@ class SpecialBlockList extends SpecialPage {
$out->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-ipblocklist-otherblocks' ), $list ) . "\n" );
}
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
class BlockListPager extends TablePager {
@@ -269,11 +273,11 @@ class BlockListPager extends TablePager {
break;
case 'ipb_target':
- if( $row->ipb_auto ){
+ if( $row->ipb_auto ) {
$formatted = $this->msg( 'autoblockid', $row->ipb_id )->parse();
} else {
list( $target, $type ) = Block::parseTarget( $row->ipb_address );
- switch( $type ){
+ switch( $type ) {
case Block::TYPE_USER:
case Block::TYPE_IP:
$formatted = Linker::userLink( $target->getId(), $target );
@@ -292,8 +296,8 @@ class BlockListPager extends TablePager {
case 'ipb_expiry':
$formatted = $this->getLanguage()->formatExpiry( $value, /* User preference timezone */ true );
- if( $this->getUser()->isAllowed( 'block' ) ){
- if( $row->ipb_auto ){
+ if( $this->getUser()->isAllowed( 'block' ) ) {
+ if( $row->ipb_auto ) {
$links[] = Linker::linkKnown(
SpecialPage::getTitleFor( 'Unblock' ),
$msg['unblocklink'],
@@ -329,7 +333,7 @@ class BlockListPager extends TablePager {
break;
case 'ipb_reason':
- $formatted = Linker::commentBlock( $value );
+ $formatted = Linker::formatComment( $value );
break;
case 'ipb_params':
@@ -391,14 +395,14 @@ class BlockListPager extends TablePager {
);
# Is the user allowed to see hidden blocks?
- if ( !$this->getUser()->isAllowed( 'hideuser' ) ){
+ if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
$info['conds']['ipb_deleted'] = 0;
}
return $info;
}
- public function getTableClass(){
+ public function getTableClass() {
return 'TablePager mw-blocklist';
}
@@ -418,7 +422,7 @@ class BlockListPager extends TablePager {
* Do a LinkBatch query to minimise database load when generating all these links
* @param $result
*/
- function preprocessResults( $result ){
+ function preprocessResults( $result ) {
wfProfileIn( __METHOD__ );
# Do a link batch query
$lb = new LinkBatch;
@@ -437,11 +441,11 @@ class BlockListPager extends TablePager {
}
$ua = UserArray::newFromIDs( $userids );
- foreach( $ua as $user ){
+ foreach( $ua as $user ) {
$name = str_replace( ' ', '_', $user->getName() );
$lb->add( NS_USER, $name );
$lb->add( NS_USER_TALK, $name );
- }
+ }
$lb->execute();
wfProfileOut( __METHOD__ );
@@ -472,7 +476,7 @@ class HTMLBlockedUsersItemSelect extends HTMLSelectField {
// This adds the explicitly requested limit value to the drop-down,
// then makes sure it's sorted correctly so when we output the list
// later, the custom option doesn't just show up last.
- $this->mParams['options'][ $this->mParent->getLanguage()->formatNum( $value ) ] = intval($value);
+ $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] = intval( $value );
asort( $this->mParams['options'] );
}