MediaWiki  REL1_24
SpecialWatchlist Class Reference

A special page that lists last changes made to the wiki, limited to user-defined list of titles. More...

Inheritance diagram for SpecialWatchlist:
Collaboration diagram for SpecialWatchlist:

List of all members.

Public Member Functions

 __construct ($page= 'Watchlist', $restriction= 'viewmywatchlist')
 buildMainQueryConds (FormOptions $opts)
 Return an array of conditions depending of options set in $opts.
 doHeader ($opts, $numRows)
 Set the text to be displayed above the changes.
 doMainQuery ($conds, $opts)
 Process the query.
 execute ($subpage)
 Main execution point.
 getDefaultOptions ()
 Get a FormOptions object containing the default options.
 outputChangesList ($rows, $opts)
 Build and output the actual changes list.
 outputFeedLinks ()
 Output feed links.
 prefixSearchSubpages ($search, $limit=10)
 Return an array of subpages beginning with $search that this special page will accept.
 setTopText (FormOptions $opts)
 Send the text to be displayed before the options.

Protected Member Functions

 countItems ($dbr)
 Count the number of items on a user's watchlist.
 cutoffLinks ($days, $options=array())
 Returns html.
 daysLink ($d, $options=array())
 fetchOptionsFromRequest ($opts)
 Fetch values for a FormOptions object from the WebRequest associated with this instance.
 getCustomFilters ()
 Get custom show/hide filters.
 getDB ()
 Return a DatabaseBase object for reading.
 hoursLink ($h, $options=array())
 runMainQueryHook (&$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts)
 showHideLink ($options, $message, $name, $value)

Detailed Description

A special page that lists last changes made to the wiki, limited to user-defined list of titles.

Definition at line 30 of file SpecialWatchlist.php.


Constructor & Destructor Documentation

SpecialWatchlist::__construct ( page = 'Watchlist',
restriction = 'viewmywatchlist' 
)

Definition at line 31 of file SpecialWatchlist.php.


Member Function Documentation

Return an array of conditions depending of options set in $opts.

Parameters:
FormOptions$opts
Returns:
array

Reimplemented from ChangesListSpecialPage.

Definition at line 179 of file SpecialWatchlist.php.

References $conds, $dbr, and getDB().

SpecialWatchlist::countItems ( dbr) [protected]

Count the number of items on a user's watchlist.

Parameters:
DatabaseBase$dbrA database connection
Returns:
int

Definition at line 607 of file SpecialWatchlist.php.

References $count, $dbr, array(), and SpecialPage\getUser().

Referenced by setTopText().

SpecialWatchlist::cutoffLinks ( days,
options = array() 
) [protected]

Returns html.

Parameters:
int$daysThis gets overwritten, so is not used
array$optionsQuery parameters for URL
Returns:
string

Definition at line 583 of file SpecialWatchlist.php.

References $options, array(), as, daysLink(), SpecialPage\getLanguage(), hoursLink(), and SpecialPage\msg().

Referenced by doHeader().

SpecialWatchlist::daysLink ( d,
options = array() 
) [protected]
SpecialWatchlist::doMainQuery ( conds,
opts 
)

Process the query.

Parameters:
array$conds
FormOptions$opts
Returns:
bool|ResultWrapper Result or false (for Recentchangeslinked only)

Reimplemented from ChangesListSpecialPage.

Definition at line 199 of file SpecialWatchlist.php.

References $conds, $dbr, $tables, $user, array(), LogPage\DELETED_ACTION, LogPage\DELETED_RESTRICTED, SpecialPage\getConfig(), getDB(), SpecialPage\getUser(), ChangeTags\modifyDisplayQuery(), runMainQueryHook(), RecentChange\selectFields(), and wfRunHooks().

Fetch values for a FormOptions object from the WebRequest associated with this instance.

Maps old pre-1.23 request parameters Watchlist used to use (different from Recentchanges' ones) to the current ones.

Parameters:
FormOptions$opts
Returns:
FormOptions

Reimplemented from ChangesListSpecialPage.

Definition at line 147 of file SpecialWatchlist.php.

References $from, $params, array(), as, and SpecialPage\getRequest().

Get custom show/hide filters.

Returns:
array Map of filter URL param names to properties (msg/default)

Reimplemented from ChangesListSpecialPage.

Definition at line 129 of file SpecialWatchlist.php.

References array(), and wfRunHooks().

Referenced by doHeader().

SpecialWatchlist::getDB ( ) [protected]

Return a DatabaseBase object for reading.

Returns:
DatabaseBase

Reimplemented from ChangesListSpecialPage.

Definition at line 305 of file SpecialWatchlist.php.

References wfGetDB().

Referenced by buildMainQueryConds(), doMainQuery(), outputChangesList(), and setTopText().

Get a FormOptions object containing the default options.

Returns:
FormOptions

Reimplemented from ChangesListSpecialPage.

Definition at line 106 of file SpecialWatchlist.php.

References $user, FormOptions\FLOAT, and SpecialPage\getUser().

SpecialWatchlist::hoursLink ( h,
options = array() 
) [protected]
SpecialWatchlist::outputChangesList ( rows,
opts 
)

Build and output the actual changes list.

Parameters:
ResultWrapper$rowsDatabase rows
FormOptions$opts

Reimplemented from ChangesListSpecialPage.

Definition at line 331 of file SpecialWatchlist.php.

References $dbr, $output, $s, $user, array(), as, SpecialPage\getConfig(), SpecialPage\getContext(), getDB(), SpecialPage\getOutput(), SpecialPage\getUser(), ChangesList\newFromContext(), RecentChange\newFromRow(), and wfGetLB().

Output feed links.

Reimplemented from ChangesListSpecialPage.

Definition at line 312 of file SpecialWatchlist.php.

References $user, SpecialPage\addFeedLinks(), array(), and SpecialPage\getUser().

SpecialWatchlist::prefixSearchSubpages ( search,
limit = 10 
)

Return an array of subpages beginning with $search that this special page will accept.

Parameters:
string$searchPrefix to search for
int$limitMaximum number of results to return
Returns:
string[] Matching subpages

Reimplemented from SpecialPage.

Definition at line 88 of file SpecialWatchlist.php.

References $limit, array(), and SpecialPage\prefixSearchArray().

SpecialWatchlist::runMainQueryHook ( &$  tables,
&$  fields,
&$  conds,
&$  query_options,
&$  join_conds,
opts 
) [protected]

Reimplemented from ChangesListSpecialPage.

Definition at line 291 of file SpecialWatchlist.php.

References $conds, $tables, array(), and wfRunHooks().

Referenced by doMainQuery().

SpecialWatchlist::showHideLink ( options,
message,
name,
value 
) [protected]

The documentation for this class was generated from the following file: