*Updated LQT accordingly
*Will add flaggedrevs function to this shortly
&$parser: Parser object
&$ig: ImageGallery object
&$parser: Parser object
&$ig: ImageGallery object
-'BeforeWatchlist': Override watchlist display or add extra SQL clauses.
-$nondefaults: Assoc array with the following keys:
- days, hideOwn, hideBots, hideMinor, namespace
-$wgUser: wgUser.
-&$hookSql: a string which will be inserted without sanitation into the SQL query
- used to get the watchlist, at the end of the WHERE part.
-
'BlockIp': before an IP address or user is blocked
$block: the Block object about to be saved
$user: the user _doing_ the block (not the one being blocked)
'BlockIp': before an IP address or user is blocked
$block: the Block object about to be saved
$user: the user _doing_ the block (not the one being blocked)
$opts: FormOptions for this request
'SpecialRecentChangesQuery': called when building sql query for SpecialRecentChanges
$opts: FormOptions for this request
'SpecialRecentChangesQuery': called when building sql query for SpecialRecentChanges
-&$conds: array of where conditionals for query
+&$conds: array of WHERE conditionals for query
&$tables: array of tables to be queried
&$join_conds: join conditions for the tables
$opts: FormOptions for this request
&$tables: array of tables to be queried
&$join_conds: join conditions for the tables
$opts: FormOptions for this request
'SpecialVersionExtensionTypes': called when generating the extensions credits, use this to change the tables headers
$extTypes: associative array of extensions types
'SpecialVersionExtensionTypes': called when generating the extensions credits, use this to change the tables headers
$extTypes: associative array of extensions types
+'SpecialWatchlistQuery': called when building sql query for SpecialWatchlist
+&$conds: array of WHERE conditionals for query
+&$tables: array of tables to be queried
+&$join_conds: join conditions for the tables
+&$fields: array of query fields
+
'TitleArrayFromResult': called when creating an TitleArray object from a database result
&$titleArray: set this to an object to override the default object returned
$res: database result used to create the object
'TitleArrayFromResult': called when creating an TitleArray object from a database result
&$titleArray: set this to an object to override the default object returned
$res: database result used to create the object
wfAppendToArrayIfNotDefault( 'namespace', $nameSpace , $defaults, $nondefaults);
wfAppendToArrayIfNotDefault( 'hidePatrolled', (int)$hidePatrolled, $defaults, $nondefaults );
wfAppendToArrayIfNotDefault( 'namespace', $nameSpace , $defaults, $nondefaults);
wfAppendToArrayIfNotDefault( 'hidePatrolled', (int)$hidePatrolled, $defaults, $nondefaults );
- $hookSql = "";
- if( ! wfRunHooks('BeforeWatchlist', array($nondefaults, $wgUser, &$hookSql)) ) {
- return;
- }
-
- if($nitems == 0) {
$wgOut->addWikiMsg( 'nowatchlist' );
return;
}
$wgOut->addWikiMsg( 'nowatchlist' );
return;
}
$andcutoff = '';
} else {
$andcutoff = "rc_timestamp > '".$dbr->timestamp( time() - intval( $days * 86400 ) )."'";
$andcutoff = '';
} else {
$andcutoff = "rc_timestamp > '".$dbr->timestamp( time() - intval( $days * 86400 ) )."'";
if( $andHideAnons ) $conds[] = $andHideAnons;
if( $andHidePatrolled ) $conds[] = $andHidePatrolled;
if( $nameSpaceClause ) $conds[] = $nameSpaceClause;
if( $andHideAnons ) $conds[] = $andHideAnons;
if( $andHidePatrolled ) $conds[] = $andHidePatrolled;
if( $nameSpaceClause ) $conds[] = $nameSpaceClause;
- if( $hookSql ) $conds[] = $hookSql;
+
+ wfRunHooks('SpecialWatchlistQuery', array(&$conds,&$tables,&$join_conds,&$fields) );
$res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $join_conds );
$numRows = $dbr->numRows( $res );
$res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $join_conds );
$numRows = $dbr->numRows( $res );