<?php
/**
* @todo Use some variant of Pager or something; the pagination here is lousy.
- *
* @file
- * @ingroup SpecialPage
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
*/
/**
if ( 0 != $prevId ) {
$overrides = array( 'from' => $this->opts->getValue( 'back' ) );
- $prev = $this->makeSelfLink( $prev, array_merge( $overrides, $changed ) );
+ $prev = $this->makeSelfLink( $prev, array_merge( $changed, $overrides ) );
}
if ( 0 != $nextId ) {
$overrides = array( 'from' => $nextId, 'back' => $prevId );
- $next = $this->makeSelfLink( $next, array_merge( $overrides, $changed ) );
+ $next = $this->makeSelfLink( $next, array_merge( $changed, $overrides ) );
}
$limitLinks = array();
foreach ( $this->limits as $limit ) {
$prettyLimit = $wgLang->formatNum( $limit );
$overrides = array( 'limit' => $limit );
- $limitLinks[] = $this->makeSelfLink( $prettyLimit, array_merge( $overrides, $changed ) );
+ $limitLinks[] = $this->makeSelfLink( $prettyLimit, array_merge( $changed, $overrides ) );
}
$nums = $wgLang->pipeList( $limitLinks );
$f .= ' ';
# Namespace selector
- $f .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
+ $f .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
Xml::namespaceSelector( $namespace, '' );
$f .= ' ';
return $f;
}
+ /**
+ * Create filter panel
+ *
+ * @return string HTML fieldset and filter panel with the show/hide links
+ */
function getFilterPanel() {
global $wgLang;
$show = wfMsgHtml( 'show' );
$types = array( 'hidetrans', 'hidelinks', 'hideredirs' );
if( $this->target->getNamespace() == NS_FILE )
$types[] = 'hideimages';
+
+ // Combined message keys: 'whatlinkshere-hideredirs', 'whatlinkshere-hidetrans', 'whatlinkshere-hidelinks', 'whatlinkshere-hideimages'
+ // To be sure they will be find by grep
foreach( $types as $type ) {
$chosen = $this->opts->getValue( $type );
- $msg = wfMsgHtml( "whatlinkshere-{$type}", $chosen ? $show : $hide );
+ $msg = $chosen ? $show : $hide;
$overrides = array( $type => !$chosen );
- $links[] = $this->makeSelfLink( $msg, array_merge( $overrides, $changed ) );
+ $links[] = wfMsgHtml( "whatlinkshere-{$type}", $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) ) );
}
return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $wgLang->pipeList( $links ) );
}