diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
commit | 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch) | |
tree | 577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/specials/SpecialPrefixindex.php | |
parent | cacc939b34e315b85e2d72997811eb6677996cc1 (diff) |
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/specials/SpecialPrefixindex.php')
-rw-r--r-- | includes/specials/SpecialPrefixindex.php | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index 7740b320..6affa735 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -29,13 +29,13 @@ class SpecialPrefixindex extends SpecialAllpages { // Inherit $maxPerPage - function __construct(){ + function __construct() { parent::__construct( 'Prefixindex' ); } /** * Entry point : initialise variables and call subfunctions. - * @param $par String: becomes "FOO" when called like Special:Prefixindex/FOO (default null) + * @param string $par becomes "FOO" when called like Special:Prefixindex/FOO (default null) */ function execute( $par ) { global $wgContLang; @@ -83,14 +83,14 @@ class SpecialPrefixindex extends SpecialAllpages { /** * HTML for the top form * @param $namespace Integer: a namespace constant (default NS_MAIN). - * @param $from String: dbKey we are starting listing at. - * @param $hideredirects Bool: hide redirects (default FALSE) + * @param string $from dbKey we are starting listing at. + * @param bool $hideredirects hide redirects (default FALSE) * @return string */ function namespacePrefixForm( $namespace = NS_MAIN, $from = '', $hideredirects = false ) { global $wgScript; - $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); + $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $out .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); $out .= Xml::openElement( 'fieldset' ); @@ -101,7 +101,7 @@ class SpecialPrefixindex extends SpecialAllpages { Xml::label( $this->msg( 'allpagesprefix' )->text(), 'nsfrom' ) . "</td> <td class='mw-input'>" . - Xml::input( 'prefix', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) . + Xml::input( 'prefix', 30, str_replace( '_', ' ', $from ), array( 'id' => 'nsfrom' ) ) . "</td> </tr> <tr> @@ -135,8 +135,8 @@ class SpecialPrefixindex extends SpecialAllpages { /** * @param $namespace Integer, default NS_MAIN * @param $prefix String - * @param $from String: list all pages from this name (default FALSE) - * @param $hideredirects Bool: hide redirects (default FALSE) + * @param string $from list all pages from this name (default FALSE) + * @param bool $hideredirects hide redirects (default FALSE) */ function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null, $hideredirects = false ) { global $wgContLang; @@ -145,8 +145,8 @@ class SpecialPrefixindex extends SpecialAllpages { $from = $prefix; } - $fromList = $this->getNamespaceKeyAndText($namespace, $from); - $prefixList = $this->getNamespaceKeyAndText($namespace, $prefix); + $fromList = $this->getNamespaceKeyAndText( $namespace, $from ); + $prefixList = $this->getNamespaceKeyAndText( $namespace, $prefix ); $namespaces = $wgContLang->getNamespaces(); if ( !$prefixList || !$fromList ) { @@ -227,7 +227,7 @@ class SpecialPrefixindex extends SpecialAllpages { } else { $nsForm = $this->namespacePrefixForm( $namespace, $prefix, $hideredirects ); $self = $this->getTitle(); - $out2 = Xml::openElement( 'table', array( 'id' => 'mw-prefixindex-nav-table' ) ) . + $out2 = Xml::openElement( 'table', array( 'id' => 'mw-prefixindex-nav-table' ) ) . '<tr> <td>' . $nsForm . @@ -241,14 +241,14 @@ class SpecialPrefixindex extends SpecialAllpages { 'hideredirects' => $hideredirects, ); - if( $namespace || ($prefix == '')) { + if( $namespace || $prefix == '' ) { // Keep the namespace even if it's 0 for empty prefixes. // This tells us we're not just a holdover from old links. $query['namespace'] = $namespace; } $nextLink = Linker::linkKnown( $self, - $this->msg( 'nextpage', str_replace( '_',' ', $s->page_title ) )->escaped(), + $this->msg( 'nextpage', str_replace( '_', ' ', $s->page_title ) )->escaped(), array(), $query ); @@ -263,4 +263,8 @@ class SpecialPrefixindex extends SpecialAllpages { $this->getOutput()->addHTML( $out2 . $out . $footer ); } + + protected function getGroupName() { + return 'pages'; + } } |