summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialRecentchangeslinked.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialRecentchangeslinked.php')
-rw-r--r--includes/specials/SpecialRecentchangeslinked.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php
index c0734354..c58ffff0 100644
--- a/includes/specials/SpecialRecentchangeslinked.php
+++ b/includes/specials/SpecialRecentchangeslinked.php
@@ -15,6 +15,7 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
$opts = parent::getDefaultOptions();
$opts->add( 'target', '' );
$opts->add( 'showlinkedto', false );
+ $opts->add( 'tagfilter', '' );
return $opts;
}
@@ -22,9 +23,10 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
$opts['target'] = $par;
}
- public function feedSetup(){
+ public function feedSetup() {
global $wgRequest;
$opts = parent::feedSetup();
+ # Feed is cached on limit,hideminor,target; other params would randomly not work
$opts['target'] = $wgRequest->getVal( 'target' );
return $opts;
}
@@ -74,6 +76,7 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
$tables = array( 'recentchanges' );
$select = array( $dbr->tableName( 'recentchanges' ) . '.*' );
$join_conds = array();
+ $query_options = array();
// left join with watchlist table to highlight watched rows
if( $uid = $wgUser->getId() ) {
@@ -82,6 +85,9 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
$join_conds['watchlist'] = array( 'LEFT JOIN', "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace" );
}
+ ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
+ $query_options, $opts['tagfilter'] );
+
// XXX: parent class does this, should we too?
// wfRunHooks('SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts ) );
@@ -133,9 +139,14 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
}
}
- $subsql[] = $dbr->selectSQLText( array_merge( $tables, array( $link_table ) ), $select, $conds + $subconds,
- __METHOD__, array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ),
- $join_conds + array( $link_table => array( 'INNER JOIN', $subjoin ) ) );
+ $subsql[] = $dbr->selectSQLText(
+ array_merge( $tables, array( $link_table ) ),
+ $select,
+ $conds + $subconds,
+ __METHOD__,
+ array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) + $query_options,
+ $join_conds + array( $link_table => array( 'INNER JOIN', $subjoin ) )
+ );
}
if( count($subsql) == 0 )
@@ -163,6 +174,9 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
Xml::input( 'target', 40, str_replace('_',' ',$opts['target']) ) .
Xml::check( 'showlinkedto', $opts['showlinkedto'], array('id' => 'showlinkedto') ) . ' ' .
Xml::label( wfMsg("recentchangeslinked-to"), 'showlinkedto' ) );
+ $tagFilter = ChangeTags::buildTagFilterSelector( $opts['tagfilter'] );
+ if ($tagFilter)
+ $extraOpts['tagfilter'] = $tagFilter;
return $extraOpts;
}