dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove "@author Aaron Schulz" annotations"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialActiveusers.php
diff --git
a/includes/specials/SpecialActiveusers.php
b/includes/specials/SpecialActiveusers.php
index
531c330
..
e7c9423
100644
(file)
--- a/
includes/specials/SpecialActiveusers.php
+++ b/
includes/specials/SpecialActiveusers.php
@@
-2,8
+2,6
@@
/**
* Implements Special:Activeusers
*
/**
* Implements Special:Activeusers
*
- * Copyright © 2008 Aaron Schulz
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@
-52,6
+50,10
@@
class SpecialActiveUsers extends SpecialPage {
$opts->add( 'username', '' );
$opts->add( 'groups', [] );
$opts->add( 'username', '' );
$opts->add( 'groups', [] );
+ $opts->add( 'excludegroups', [] );
+ // Backwards-compatibility with old URLs
+ $opts->add( 'hidebots', false, FormOptions::BOOL );
+ $opts->add( 'hidesysops', false, FormOptions::BOOL );
$opts->fetchValuesFromRequest( $this->getRequest() );
$opts->fetchValuesFromRequest( $this->getRequest() );
@@
-82,17
+84,26
@@
class SpecialActiveUsers extends SpecialPage {
$groups = User::getAllGroups();
foreach ( $groups as $group ) {
$groups = User::getAllGroups();
foreach ( $groups as $group ) {
- $msg =
User::getGroupName( $group
);
+ $msg =
htmlspecialchars( UserGroupMembership::getGroupName( $group )
);
$options[$msg] = $group;
}
$options[$msg] = $group;
}
+ // Backwards-compatibility with old URLs
+ $req = $this->getRequest();
+ $excludeDefault = [];
+ if ( $req->getCheck( 'hidebots' ) ) {
+ $excludeDefault[] = 'bot';
+ }
+ if ( $req->getCheck( 'hidesysops' ) ) {
+ $excludeDefault[] = 'sysop';
+ }
+
$formDescriptor = [
'username' => [
'type' => 'user',
'name' => 'username',
'label-message' => 'activeusers-from',
],
$formDescriptor = [
'username' => [
'type' => 'user',
'name' => 'username',
'label-message' => 'activeusers-from',
],
-
'groups' => [
'type' => 'multiselect',
'dropdown' => true,
'groups' => [
'type' => 'multiselect',
'dropdown' => true,
@@
-101,6
+112,15
@@
class SpecialActiveUsers extends SpecialPage {
'label-message' => 'activeusers-groups',
'options' => $options,
],
'label-message' => 'activeusers-groups',
'options' => $options,
],
+ 'excludegroups' => [
+ 'type' => 'multiselect',
+ 'dropdown' => true,
+ 'flatlist' => true,
+ 'name' => 'excludegroups',
+ 'label-message' => 'activeusers-excludegroups',
+ 'options' => $options,
+ 'default' => $excludeDefault,
+ ],
];
HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() )
];
HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() )