<?php
/**
- * @todo Use some variant of Pager or something; the pagination here is lousy.
- * @file
+ * Implements Special:Whatlinkshere
*
* 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
* 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
+ *
+ * @file
+ * @todo Use some variant of Pager or something; the pagination here is lousy.
*/
/**
- * implements Special:Whatlinkshere
+ * Implements Special:Whatlinkshere
+ *
* @ingroup SpecialPage
*/
class SpecialWhatLinksHere extends SpecialPage {
return;
}
+ $this->skin->setRelevantTitle( $this->target );
+
+
$this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() );
$wgOut->setPageTitle( wfMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ) );
// templatelinks comes second so that the templatelinks row overwrites the
// pagelinks row, so we get (inclusion) rather than nothing
if( $fetchlinks ) {
- while ( $row = $dbr->fetchObject( $plRes ) ) {
+ foreach ( $plRes as $row ) {
$row->is_template = 0;
$row->is_image = 0;
$rows[$row->page_id] = $row;
}
- $dbr->freeResult( $plRes );
-
}
if( !$hidetrans ) {
- while ( $row = $dbr->fetchObject( $tlRes ) ) {
+ foreach ( $tlRes as $row ) {
$row->is_template = 1;
$row->is_image = 0;
$rows[$row->page_id] = $row;
}
- $dbr->freeResult( $tlRes );
}
if( !$hideimages ) {
- while ( $row = $dbr->fetchObject( $ilRes ) ) {
+ foreach ( $ilRes as $row ) {
$row->is_template = 0;
$row->is_image = 1;
$rows[$row->page_id] = $row;
}
- $dbr->freeResult( $ilRes );
}
// Sort by key and then change the keys to 0-based indices
$f = Xml::openElement( 'form', array( 'action' => $wgScript ) );
# Values that should not be forgotten
- $f .= Xml::hidden( 'title', $this->getTitle()->getPrefixedText() );
+ $f .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
foreach ( $this->opts->getUnconsumedValues() as $name => $value ) {
- $f .= Xml::hidden( $name, $value );
+ $f .= Html::hidden( $name, $value );
}
$f .= Xml::fieldset( wfMsg( 'whatlinkshere' ) );