summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialPrefixindex.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialPrefixindex.php')
-rw-r--r--includes/specials/SpecialPrefixindex.php43
1 files changed, 23 insertions, 20 deletions
diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php
index ea0c1135..680fe343 100644
--- a/includes/specials/SpecialPrefixindex.php
+++ b/includes/specials/SpecialPrefixindex.php
@@ -6,9 +6,6 @@
*/
class SpecialPrefixindex extends SpecialAllpages {
// Inherit $maxPerPage
-
- // Define other properties
- protected $nsfromMsg = 'allpagesprefix';
function __construct(){
parent::__construct( 'Prefixindex' );
@@ -26,7 +23,7 @@ class SpecialPrefixindex extends SpecialAllpages {
# GET values
$from = $wgRequest->getVal( 'from' );
- $prefix = $wgRequest->getVal( 'prefix' );
+ $prefix = $wgRequest->getVal( 'prefix', '' );
$namespace = $wgRequest->getInt( 'namespace' );
$namespaces = $wgContLang->getNamespaces();
@@ -63,7 +60,7 @@ class SpecialPrefixindex extends SpecialAllpages {
$out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
$out .= "<tr>
<td class='mw-label'>" .
- Xml::label( wfMsg( 'allpagesfrom' ), 'nsfrom' ) .
+ Xml::label( wfMsg( 'allpagesprefix' ), 'nsfrom' ) .
"</td>
<td class='mw-input'>" .
Xml::input( 'from', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) .
@@ -90,7 +87,7 @@ class SpecialPrefixindex extends SpecialAllpages {
* @param string $from list all pages from this name (default FALSE)
*/
function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null ) {
- global $wgOut, $wgUser, $wgContLang;
+ global $wgOut, $wgUser, $wgContLang, $wgLang;
$sk = $wgUser->getSkin();
@@ -99,7 +96,6 @@ class SpecialPrefixindex extends SpecialAllpages {
$fromList = $this->getNamespaceKeyAndText($namespace, $from);
$prefixList = $this->getNamespaceKeyAndText($namespace, $prefix);
$namespaces = $wgContLang->getNamespaces();
- $align = $wgContLang->isRtl() ? 'left' : 'right';
if ( !$prefixList || !$fromList ) {
$out = wfMsgWikiHtml( 'allpagesbadtitle' );
@@ -134,7 +130,7 @@ class SpecialPrefixindex extends SpecialAllpages {
$n = 0;
if( $res->numRows() > 0 ) {
- $out = '<table style="background: inherit;" border="0" width="100%">';
+ $out = Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-prefixindex-list-table' ) );
while( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
$t = Title::makeTitle( $s->page_namespace, $s->page_title );
@@ -157,7 +153,7 @@ class SpecialPrefixindex extends SpecialAllpages {
if( ($n % 3) != 0 ) {
$out .= '</tr>';
}
- $out .= '</table>';
+ $out .= Xml::closeElement( 'table' );
} else {
$out = '';
}
@@ -168,20 +164,27 @@ class SpecialPrefixindex extends SpecialAllpages {
} else {
$nsForm = $this->namespacePrefixForm( $namespace, $prefix );
$self = $this->getTitle();
- $out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">';
- $out2 .= '<tr valign="top"><td>' . $nsForm;
- $out2 .= '</td><td align="' . $align . '" style="font-size: smaller; margin-bottom: 1em;">' .
- $sk->makeKnownLinkObj( $self,
- wfMsg ( 'allpages' ) );
+ $out2 = Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-prefixindex-nav-table' ) ) .
+ '<tr>
+ <td>' .
+ $nsForm .
+ '</td>
+ <td id="mw-prefixindex-nav-form">' .
+ $sk->makeKnownLinkObj( $self, wfMsg ( 'allpages' ) );
+
if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
$namespaceparam = $namespace ? "&namespace=$namespace" : "";
- $out2 .= " | " . $sk->makeKnownLinkObj(
- $self,
- wfMsgHtml( 'nextpage', htmlspecialchars( $s->page_title ) ),
- "from=" . wfUrlEncode( $s->page_title ) .
- "&prefix=" . wfUrlEncode( $prefix ) . $namespaceparam );
+ $out2 = $wgLang->pipeList( array(
+ $out2,
+ $sk->makeKnownLinkObj(
+ $self,
+ wfMsgHtml( 'nextpage', str_replace( '_',' ', htmlspecialchars( $s->page_title ) ) ),
+ "from=" . wfUrlEncode( $s->page_title ) .
+ "&prefix=" . wfUrlEncode( $prefix ) . $namespaceparam )
+ ) );
}
- $out2 .= "</td></tr></table><hr />";
+ $out2 .= "</td></tr>" .
+ Xml::closeElement( 'table' );
}
$wgOut->addHTML( $out2 . $out );