Go to the documentation of this file.
32 parent::__construct(
'Specialpages' );
39 $out->allowClickjacking();
40 $out->addModuleStyles(
'mediawiki.special' );
44 if ( $groups ===
false ) {
52 global $wgSortSpecialPages;
56 if ( !count( $pages ) ) {
57 # Yeah, that was pointless. Thanks for coming.
64 foreach ( $pages
as $page ) {
65 if ( $page->isListed() ) {
66 $group = $page->getFinalGroupName();
67 if ( !isset( $groups[$group] ) ) {
68 $groups[$group] =
array();
70 $groups[$group][$page->getDescription()] =
array(
71 $page->getPageTitle(),
72 $page->isRestricted(),
79 if ( $wgSortSpecialPages ) {
80 foreach ( $groups
as $group => $sortedPages ) {
81 ksort( $groups[$group] );
86 if ( array_key_exists(
'other', $groups ) ) {
87 $other = $groups[
'other'];
88 unset( $groups[
'other'] );
89 $groups[
'other'] = $other;
98 $includesRestrictedPages =
false;
99 $includesCachedPages =
false;
101 foreach ( $groups
as $group => $sortedPages ) {
102 $total = count( $sortedPages );
103 $middle = ceil(
$total / 2 );
107 "<h2 class=\"mw-specialpagesgroup\" id=\"mw-specialpagesgroup-$group\">$1</h2>\n",
108 "specialpages-group-$group"
113 array(
'style' =>
'width:100%;',
'class' =>
'mw-specialpages-table' )
119 foreach ( $sortedPages
as $desc => $specialpage ) {
120 list(
$title, $restricted, $cached ) = $specialpage;
122 $pageClasses =
array();
124 $includesCachedPages =
true;
125 $pageClasses[] =
'mw-specialpagecached';
128 $includesRestrictedPages =
true;
129 $pageClasses[] =
'mw-specialpagerestricted';
135 array(
'class' => implode(
' ', $pageClasses ) ),
139 # Split up the larger groups
156 if ( $includesRestrictedPages || $includesCachedPages ) {
157 $out->wrapWikiMsg(
"<h2 class=\"mw-specialpages-note-top\">$1</h2>",
'specialpages-note-top' );
158 $out->wrapWikiMsg(
"<div class=\"mw-specialpages-notes\">\n$1\n</div>",
'specialpages-note' );
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getOutput()
Get the OutputPage being used for this instance.
Shortcut to construct a special page which is unlisted by default.
static getUsablePages(User $user=null)
Return categorised listable special pages which are available for the current user,...
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
static closeElement( $element)
Returns "</$element>", except if $wgWellFormedXml is off, in which case it returns the empty string w...
static openElement( $element, $attribs=array())
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getUser()
Shortcut to get the User executing this instance.
when a variable name is used in a it is silently declared as a new masking the global
A special page that lists special pages.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
presenting them properly to the user as errors is done by the caller $title
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.