$outputPage = $this->getOutput();
$title = Title::newFromURL( $target );
if ( !$title || $title->getInterwiki() != '' ) {
- $outputPage->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", 'allpagesbadtitle' );
+ $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )->parse() . '</div>' );
return false;
}
// left join with watchlist table to highlight watched rows
$uid = $this->getUser()->getId();
- if ( $uid ) {
+ if ( $uid && $this->getUser()->isAllowed( 'viewmywatchlist' ) ) {
$tables[] = 'watchlist';
$select[] = 'wl_user';
$join_conds['watchlist'] = array( 'LEFT JOIN', array(
}
/**
- * @param $opts FormOptions
+ * Get options to be displayed in a form
+ *
+ * @param FormOptions $opts
* @return array
*/
function getExtraOptions( $opts ) {
- $opts->consumeValues( array( 'showlinkedto', 'target', 'tagfilter' ) );
- $extraOpts = array();
- $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
+ $extraOpts = parent::getExtraOptions( $opts );
+
+ $opts->consumeValues( array( 'showlinkedto', 'target' ) );
+
$extraOpts['target'] = array( $this->msg( 'recentchangeslinked-page' )->escaped(),
Xml::input( 'target', 40, str_replace( '_', ' ', $opts['target'] ) ) .
Xml::check( 'showlinkedto', $opts['showlinkedto'], array( 'id' => 'showlinkedto' ) ) . ' ' .
Xml::label( $this->msg( 'recentchangeslinked-to' )->text(), 'showlinkedto' ) );
- $tagFilter = ChangeTags::buildTagFilterSelector( $opts['tagfilter'] );
- if ( $tagFilter ) {
- $extraOpts['tagfilter'] = $tagFilter;
- }
+
return $extraOpts;
}
$this->getOutput()->addBacklinkSubtitle( $target );
}
}
-
- function setBottomText( FormOptions $opts ) {
- if ( isset( $this->mResultEmpty ) && $this->mResultEmpty ) {
- $this->getOutput()->addWikiMsg( 'recentchangeslinked-noresult' );
- }
- }
}