}
public function feedSetup() {
- global $wgRequest;
$opts = parent::feedSetup();
- $opts['target'] = $wgRequest->getVal( 'target' );
+ $opts['target'] = $this->getRequest()->getVal( 'target' );
return $opts;
}
}
public function doMainQuery( $conds, $opts ) {
- global $wgUser, $wgOut;
-
$target = $opts['target'];
$showlinkedto = $opts['showlinkedto'];
$limit = $opts['limit'];
}
$title = Title::newFromURL( $target );
if( !$title || $title->getInterwiki() != '' ){
- $wgOut->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", 'allpagesbadtitle' );
+ $this->getOutput()->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", 'allpagesbadtitle' );
return false;
}
- $wgOut->setPageTitle( wfMsg( 'recentchangeslinked-title', $title->getPrefixedText() ) );
+ $this->getOutput()->setPageTitle( $this->msg( 'recentchangeslinked-title', $title->getPrefixedText() ) );
/*
* Ordinary links are in the pagelinks table, while transclusions are
$query_options = array();
// left join with watchlist table to highlight watched rows
- $uid = $wgUser->getId();
+ $uid = $this->getUser()->getId();
if( $uid ) {
$tables[] = 'watchlist';
$select[] = 'wl_user';
$join_conds['watchlist'] = array( 'LEFT JOIN', "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace" );
}
- if ( $wgUser->isAllowed( 'rollback' ) ) {
+ if ( $this->getUser()->isAllowed( 'rollback' ) ) {
$tables[] = 'page';
$join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
$select[] = 'page_latest';
// imagelinks and categorylinks tables have no xx_namespace field, and have xx_to instead of xx_title
if( $link_table == 'imagelinks' ) $link_ns = NS_FILE;
- else if( $link_table == 'categorylinks' ) $link_ns = NS_CATEGORY;
+ elseif( $link_table == 'categorylinks' ) $link_ns = NS_CATEGORY;
else $link_ns = 0;
if( $showlinkedto ) {
return $this->rclTargetTitle;
}
- function setTopText( OutputPage $out, FormOptions $opts ) {
- global $wgUser;
- $skin = $wgUser->getSkin();
+ function setTopText( FormOptions $opts ) {
$target = $this->getTargetTitle();
- if( $target )
- $out->setSubtitle( wfMsg( 'recentchangeslinked-backlink', $skin->link( $target,
- $target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) );
+ if( $target ) {
+ $this->getOutput()->addBacklinkSubtitle( $target );
+ }
}
public function getFeedQuery() {
}
}
- function setBottomText( OutputPage $out, FormOptions $opts ) {
- if( isset( $this->mResultEmpty ) && $this->mResultEmpty ){
- $out->addWikiMsg( 'recentchangeslinked-noresult' );
+ function setBottomText( FormOptions $opts ) {
+ if( isset( $this->mResultEmpty ) && $this->mResultEmpty ) {
+ $this->getOutput()->addWikiMsg( 'recentchangeslinked-noresult' );
}
}
}