/**
* List of special pages, followed by what subtitle they should go under
* at Special:SpecialPages
+ *
+ * @deprecated 1.21 Override SpecialPage::getGroupName instead
*/
-$wgSpecialPageGroups = array(
- 'DoubleRedirects' => 'maintenance',
- 'BrokenRedirects' => 'maintenance',
- 'Lonelypages' => 'maintenance',
- 'Uncategorizedpages' => 'maintenance',
- 'Uncategorizedcategories' => 'maintenance',
- 'Uncategorizedimages' => 'maintenance',
- 'Uncategorizedtemplates' => 'maintenance',
- 'Unusedcategories' => 'maintenance',
- 'Unusedimages' => 'maintenance',
- 'Protectedpages' => 'maintenance',
- 'Protectedtitles' => 'maintenance',
- 'Unusedtemplates' => 'maintenance',
- 'Withoutinterwiki' => 'maintenance',
- 'Longpages' => 'maintenance',
- 'Shortpages' => 'maintenance',
- 'Ancientpages' => 'maintenance',
- 'Deadendpages' => 'maintenance',
- 'Wantedpages' => 'maintenance',
- 'Wantedcategories' => 'maintenance',
- 'Wantedfiles' => 'maintenance',
- 'Wantedtemplates' => 'maintenance',
- 'Unwatchedpages' => 'maintenance',
- 'Fewestrevisions' => 'maintenance',
-
- 'Userlogin' => 'login',
- 'Userlogout' => 'login',
- 'CreateAccount' => 'login',
-
- 'Recentchanges' => 'changes',
- 'Recentchangeslinked' => 'changes',
- 'Watchlist' => 'changes',
- 'Newimages' => 'changes',
- 'Newpages' => 'changes',
- 'Log' => 'changes',
- 'Tags' => 'changes',
-
- 'Upload' => 'media',
- 'Listfiles' => 'media',
- 'MIMEsearch' => 'media',
- 'FileDuplicateSearch' => 'media',
- 'Filepath' => 'media',
-
- 'Listusers' => 'users',
- 'Activeusers' => 'users',
- 'Listgrouprights' => 'users',
- 'BlockList' => 'users',
- 'Contributions' => 'users',
- 'Emailuser' => 'users',
- 'Listadmins' => 'users',
- 'Listbots' => 'users',
- 'Userrights' => 'users',
- 'Block' => 'users',
- 'Unblock' => 'users',
- 'Preferences' => 'users',
- 'ChangeEmail' => 'users',
- 'ChangePassword' => 'users',
- 'DeletedContributions' => 'users',
- 'PasswordReset' => 'users',
-
- 'Mostlinked' => 'highuse',
- 'Mostlinkedcategories' => 'highuse',
- 'Mostlinkedtemplates' => 'highuse',
- 'Mostcategories' => 'highuse',
- 'Mostimages' => 'highuse',
- 'Mostinterwikis' => 'highuse',
- 'Mostrevisions' => 'highuse',
-
- 'Allpages' => 'pages',
- 'Prefixindex' => 'pages',
- 'Listredirects' => 'pages',
- 'Categories' => 'pages',
- 'Disambiguations' => 'pages',
- 'PagesWithProp' => 'pages',
-
- 'Randompage' => 'redirects',
- 'Randomredirect' => 'redirects',
- 'Mypage' => 'redirects',
- 'Mytalk' => 'redirects',
- 'Mycontributions' => 'redirects',
- 'Search' => 'redirects',
- 'LinkSearch' => 'redirects',
-
- 'ComparePages' => 'pagetools',
- 'Movepage' => 'pagetools',
- 'MergeHistory' => 'pagetools',
- 'Revisiondelete' => 'pagetools',
- 'Undelete' => 'pagetools',
- 'Export' => 'pagetools',
- 'Import' => 'pagetools',
- 'Whatlinkshere' => 'pagetools',
-
- 'Statistics' => 'wiki',
- 'Version' => 'wiki',
- 'Lockdb' => 'wiki',
- 'Unlockdb' => 'wiki',
- 'Allmessages' => 'wiki',
- 'Popularpages' => 'wiki',
-
- 'Specialpages' => 'other',
- 'Blockme' => 'other',
- 'Booksources' => 'other',
- 'JavaScriptTest' => 'other',
-);
+$wgSpecialPageGroups = array();
/** Whether or not to sort special pages in Special:Specialpages */
$this->getOutput()->addFeedLink( $format, $url );
}
}
+
+ /**
+ * Get the group that the special page belongs in on Special:SpecialPage
+ * Use this method, instead of getGroupName to allow customization
+ * of the group name from the wiki side
+ *
+ * @return string Group of this special page
+ * @since 1.21
+ */
+ public function getFinalGroupName() {
+ $name = $this->getName();
+ $group = '-';
+
+ // Allow overridding the group from the wiki side
+ $msg = $this->msg( 'specialpages-specialpagegroup-' . strtolower( $name ) )->inContentLanguage();
+ if ( !$msg->isBlank() ) {
+ $group = $msg->text();
+ } else {
+ // Than use the group from this object
+ $group = $this->getGroupName();
+
+ // Group '-' is used as default to have the chance to determine,
+ // if the special pages overriddes this method,
+ // if not overridden, $wgSpecialPageGroups is checked for b/c
+ if ( $group === '-' && isset( $wgSpecialPageGroups[$name] ) ) {
+ $group = $wgSpecialPageGroups[$name];
+ }
+ }
+
+ // never give '-' back, change to 'other'
+ if ( $group === '-' ) {
+ $group = 'other';
+ }
+
+ return $group;
+ }
+
+ /**
+ * Under which header this special page is listed in Special:SpecialPages
+ * See messages 'specialpages-group-*' for valid names
+ * This method defaults to group 'other'
+ *
+ * @return string
+ * @since 1.21
+ */
+ protected function getGroupName() {
+ // '-' used here to determine, if this group is overridden or has a hardcoded 'other'
+ // Needed for b/c in getFinalGroupName
+ return '-';
+ }
}
/**
*
* @param $page Mixed: SpecialPage or string
* @param $group String
+ * @deprecated 1.21 Override SpecialPage::getGroupName
*/
public static function setGroup( $page, $group ) {
+ wfDeprecated( __METHOD__, '1.21' );
+
global $wgSpecialPageGroups;
$name = is_object( $page ) ? $page->getName() : $page;
$wgSpecialPageGroups[$name] = $group;
*
* @param $page SpecialPage
* @return String
+ * @deprecated 1.21 Use SpecialPage::getFinalGroupName
*/
public static function getGroup( &$page ) {
- $name = $page->getName();
+ wfDeprecated( __METHOD__, '1.21' );
- global $wgSpecialPageGroups;
- static $specialPageGroupsCache = array();
- if ( isset( $specialPageGroupsCache[$name] ) ) {
- return $specialPageGroupsCache[$name];
- }
- $msg = wfMessage( 'specialpages-specialpagegroup-' . strtolower( $name ) );
- if ( !$msg->isBlank() ) {
- $group = $msg->text();
- } else {
- $group = isset( $wgSpecialPageGroups[$name] )
- ? $wgSpecialPageGroups[$name]
- : '-';
- }
- if ( $group == '-' ) {
- $group = 'other';
- }
- $specialPageGroupsCache[$name] = $group;
- return $group;
+ return $page->getFinalGroupName();
}
/**
}
}
+ protected function getGroupName() {
+ return 'users';
+ }
}
}
+ protected function getGroupName() {
+ return 'wiki';
+ }
}
/**
return null;
}
}
+
+ protected function getGroupName() {
+ return 'pages';
+ }
}
);
return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
$out->setPageTitle( $this->msg( 'blockipsuccesssub' ) );
$out->addWikiMsg( 'blockipsuccesstext', wfEscapeWikiText( $this->target ) );
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
# BC @since 1.18
$out->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-ipblocklist-otherblocks' ), $list ) . "\n" );
}
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
class BlockListPager extends TablePager {
$this->getOutput()->addWikiMsg( 'proxyblocksuccess' );
}
+
+ protected function getGroupName() {
+ return 'other';
+ }
}
$url = str_replace( '$1', $this->isbn, $url );
return '<li><a href="' . htmlspecialchars( $url ) . '" class="external">' . htmlspecialchars( $label ) . '</a></li>';
}
+
+ protected function getGroupName() {
+ return 'other';
+ }
}
$out .= " {$arr} {$to}";
return $out;
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
Html::closeElement( 'div' )
);
}
+
+ protected function getGroupName() {
+ return 'pages';
+ }
}
/**
return $status->value;
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
$user->saveSettings();
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
}
return true;
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
Xml::closeElement( 'form' );
return $form;
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
/**
return array( 'page_title' );
}
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
Xml::closeElement( 'form' );
return $f;
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
return "$from $edit $arr $to";
}
+
+ protected function getGroupName() {
+ return 'pages';
+ }
}
return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
return $status;
}
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
return $pageSet;
}
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
return $this->getLanguage()->specialList( $plink, $nlink );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
return "$plink . . $user . . $time";
}
+
+ protected function getGroupName() {
+ return 'media';
+ }
}
Html::closeElement( 'form' )
);
}
+
+ protected function getGroupName() {
+ return 'media';
+ }
}
);
}
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
/**
// $wgJavaScriptTestConfig in DefaultSettings.php
$out->addJsConfigVars( 'QUnitTestSwarmInjectJSPath', $wgJavaScriptTestConfig['qunit']['testswarm-injectjs'] );
}
+
+ protected function getGroupName() {
+ return 'other';
+ }
}
function getOrderFields() {
return array();
}
+
+ protected function getGroupName() {
+ return 'redirects';
+ }
}
}
$this->getOutput()->addHTML( $html );
}
+
+ protected function getGroupName() {
+ return 'media';
+ }
}
/**
return '<ul><li>' . implode( "</li>\n<li>", $r ) . '</li></ul>';
}
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
return "<del>$rd_link</del>";
}
}
+
+ protected function getGroupName() {
+ return 'pages';
+ }
}
$this->getOutput()->addHTML( $s );
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
$out->addSubtitle( $this->msg( 'lockdbsuccesssub' ) );
$out->addWikiMsg( 'lockdbsuccesstext' );
}
+
+ protected function getGroupName() {
+ return 'wiki';
+ }
}
$this->getOutput()->addHTML( $page->getDescription()->parseAsBlock() );
}
+ protected function getGroupName() {
+ return 'changes';
+ }
}
return array( 'page_title' );
}
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
function sortDescending() {
return true;
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
);
return in_array( $type, $types );
}
+
+ protected function getGroupName() {
+ return 'media';
+ }
}
return true;
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
class MergeHistoryPager extends ReverseChronologicalPager {
return $this->getLanguage()->specialList( $link, $count );
}
+
+ protected function getGroupName() {
+ return 'highuse';
+ }
}
return $this->msg( 'nimagelinks' )->numParams( $row->value )->escaped() . '<br />';
}
+ protected function getGroupName() {
+ return 'highuse';
+ }
}
return $this->getLanguage()->specialList( $link, $count );
}
+
+ protected function getGroupName() {
+ return 'highuse';
+ }
}
$this->msg( 'nlinks' )->numParams( $result->value )->escaped() );
return $this->getLanguage()->specialList( $link, $wlh );
}
+
+ protected function getGroupName() {
+ return 'highuse';
+ }
}
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
return $this->getLanguage()->specialList( $plink, $nlinks );
}
+
+ protected function getGroupName() {
+ return 'highuse';
+ }
}
$label = $this->msg( 'ntransclusions' )->numParams( $result->value )->escaped();
return Linker::link( $wlh, $label );
}
+
+ protected function getGroupName() {
+ return 'highuse';
+ }
}
function sortDescending() {
return true;
}
+
+ protected function getGroupName() {
+ return 'highuse';
+ }
}
}
$out->addHTML( "</ul>\n" );
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
$this->getOutput()->addHTML( $pager->getNavigationBar() );
}
}
+
+ protected function getGroupName() {
+ return 'changes';
+ }
}
/**
}
return '';
}
+
+ protected function getGroupName() {
+ return 'changes';
+ }
}
/**
}
return $ret;
}
+
+ protected function getGroupName() {
+ return 'pages';
+ }
}
return false;
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
$nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped();
return $this->getLanguage()->specialList( $link, $nv );
}
+
+ protected function getGroupName() {
+ return 'wiki';
+ }
}
return true;
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
$this->getOutput()->addHTML( $out2 . $out . $footer );
}
+
+ protected function getGroupName() {
+ return 'pages';
+ }
}
array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
implode( "\n", $options ) ) . "</span>";
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
/**
array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
implode( "\n", $options ) );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
/**
return $dbr->fetchObject( $res );
}
+
+ protected function getGroupName() {
+ return 'redirects';
+ }
}
'mediawiki.special.recentchanges',
) );
}
+
+ protected function getGroupName() {
+ return 'changes';
+ }
}
array( 'value' => $bitfield, 'comment' => $reason )
);
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
$this->extraParams[$key] = $value;
}
+ protected function getGroupName() {
+ return 'redirects';
+ }
}
? "${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]"
: "<del>${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]</del>";
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
$groups = array();
foreach ( $pages as $page ) {
if ( $page->isListed() ) {
- $group = SpecialPageFactory::getGroup( $page );
+ $group = $page->getFinalGroupName();
if( !isset( $groups[$group] ) ) {
$groups[$group] = array();
}
Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( $header )->parse() ) .
Xml::closeElement( 'tr' );
}
+
+ protected function getGroupName() {
+ return 'wiki';
+ }
}
return Xml::tags( 'tr', null, $newRow ) . "\n";
}
+
+ protected function getGroupName() {
+ return 'changes';
+ }
}
return true;
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
);
}
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
return array( 'page_namespace', 'page_title' );
return array( 'page_title' );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
$out->addWikiText( '<div class="error">' . $status->getWikiText( 'undelete-error-short', 'undelete-error-long' ) . '</div>' );
}
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
$out->addSubtitle( $this->msg( 'unlockdbsuccesssub' ) );
$out->addWikiMsg( 'unlockdbsuccesstext' );
}
+
+ protected function getGroupName() {
+ return 'wiki';
+ }
}
$title = Title::makeTitle( NS_CATEGORY, $result->title );
return Linker::link( $title, htmlspecialchars( $title->getText() ) );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
return $this->msg( 'unusedimagestext' )->parseAsBlock();
}
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
function getPageHeader() {
return $this->msg( 'unusedtemplatestext' )->parseAsBlock();
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
return $this->getLanguage()->specialList( $plink, $wlink );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
$gallery->toHtml() . "</li>\n";
}
+ protected function getGroupName() {
+ return 'media';
+ }
}
/**
$query
);
}
+
+ protected function getGroupName() {
+ return 'login';
+ }
}
$out->returnToMain();
}
+
+ protected function getGroupName() {
+ return 'login';
+ }
}
$output->addHTML( Xml::element( 'h2', null, $rightsLogPage->getName()->text() ) );
LogEventsList::showLogExtract( $output, 'rights', $user->getUserPage() );
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}
return $out;
}
+ protected function getGroupName() {
+ return 'wiki';
+ }
+
function showEasterEgg() {
$rx = $rp = $xe = '';
$alpha = array( "", "kbQW", "\$\n()" );
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
return $this->getLanguage()->specialList( $plink, $nlinks );
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
)
);
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
wfRunHooks( 'WantedPages::getQueryInfo', array( &$this, &$query ) );
return $query;
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
'page_title = tl_title' ) ) )
);
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}
return floor( $count / 2 );
}
+
+ protected function getGroupName() {
+ return 'changes';
+ }
}
}
return Xml::fieldset( $this->msg( 'whatlinkshere-filters' )->text(), $this->getLanguage()->pipeList( $links ) );
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}
}
return $query;
}
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
}