This patch makes Special:Listuser includeable by inserting the following
wikitext:
{{special:Listusers}}
It supports all of [[Special:ListUsers]] short parameters. To list users
members of the 'sysop' group use the following wikitext:
{{Special:ListUsers/sysop}}
Change-Id: Ia0efbfbd6300db5ad67840667c1cb12ab5e003c3
* Grunny
* Harry Burt
* Ireas
* Grunny
* Harry Burt
* Ireas
* Jaska Zedlik
* Jeremy Baron
* Jidanni
* Jaska Zedlik
* Jeremy Baron
* Jidanni
the new deletelogentry permission is required for this.
* (bug 14237) Allow PAGESINCATEGORY to distinguish between 'all', 'pages', 'files'
and 'subcats'
the new deletelogentry permission is required for this.
* (bug 14237) Allow PAGESINCATEGORY to distinguish between 'all', 'pages', 'files'
and 'subcats'
+* (bug 38362) Make Special:Listuser includeable on wiki pages.
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
* @param $context IContextSource
* @param $par null|array
*/
* @param $context IContextSource
* @param $par null|array
*/
- function __construct( IContextSource $context = null, $par = null ) {
+ function __construct( IContextSource $context = null, $par = null, $including = null ) {
if ( $context ) {
$this->setContext( $context );
}
if ( $context ) {
$this->setContext( $context );
}
}
$this->editsOnly = $request->getBool( 'editsOnly' );
$this->creationSort = $request->getBool( 'creationSort' );
}
$this->editsOnly = $request->getBool( 'editsOnly' );
$this->creationSort = $request->getBool( 'creationSort' );
+ $this->including = $including;
$this->requestedUser = '';
if ( $un != '' ) {
$this->requestedUser = '';
if ( $un != '' ) {
$lang = $this->getLanguage();
$lang = $this->getLanguage();
$groups_list = self::getGroups( $row->user_id );
$groups_list = self::getGroups( $row->user_id );
- if( count( $groups_list ) > 0 ) {
+ if( !$this->including && count( $groups_list ) > 0 ) {
$list = array();
foreach( $groups_list as $group )
$list[] = self::buildGroupLink( $group, $userName );
$groups = $lang->commaList( $list );
$list = array();
foreach( $groups_list as $group )
$list[] = self::buildGroupLink( $group, $userName );
$groups = $lang->commaList( $list );
- } else {
- $groups = '';
}
$item = $lang->specialList( $ulinks, $groups );
}
$item = $lang->specialList( $ulinks, $groups );
$item = "<span class=\"deleted\">$item</span>";
}
$item = "<span class=\"deleted\">$item</span>";
}
+ if ( !$this->including && $wgEdititis ) {
$edits = ' [' . $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped() . ']';
$edits = ' [' . $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped() . ']';
- } else {
- $edits = '';
}
$created = '';
# Some rows may be NULL
}
$created = '';
# Some rows may be NULL
+ if( !$this->including && $row->creation ) {
$user = $this->getUser();
$d = $lang->userDate( $row->creation, $user );
$t = $lang->userTime( $row->creation, $user );
$user = $this->getUser();
$d = $lang->userDate( $row->creation, $user );
$t = $lang->userTime( $row->creation, $user );
*/
public function __construct() {
parent::__construct( 'Listusers' );
*/
public function __construct() {
parent::__construct( 'Listusers' );
+ $this->mIncludable = true;
$this->setHeaders();
$this->outputHeader();
$this->setHeaders();
$this->outputHeader();
- $up = new UsersPager( $this->getContext(), $par );
+ $up = new UsersPager( $this->getContext(), $par, $this->including() );
# getBody() first to check, if empty
$usersbody = $up->getBody();
# getBody() first to check, if empty
$usersbody = $up->getBody();
- $s = $up->getPageHeader();
+ $s = '';
+ if ( !$this->including() ) {
+ $s = $up->getPageHeader();
+ }
+
if( $usersbody ) {
$s .= $up->getNavigationBar();
$s .= Html::rawElement( 'ul', array(), $usersbody );
if( $usersbody ) {
$s .= $up->getNavigationBar();
$s .= Html::rawElement( 'ul', array(), $usersbody );