MediaWiki
REL1_24
|
A special page that lists last changes made to the wiki, limited to user-defined list of titles. More...
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) |
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.
SpecialWatchlist::__construct | ( | $ | page = 'Watchlist' , |
$ | restriction = 'viewmywatchlist' |
||
) |
Definition at line 31 of file SpecialWatchlist.php.
Return an array of conditions depending of options set in $opts.
FormOptions | $opts |
Reimplemented from ChangesListSpecialPage.
Definition at line 179 of file SpecialWatchlist.php.
SpecialWatchlist::countItems | ( | $ | dbr | ) | [protected] |
Count the number of items on a user's watchlist.
DatabaseBase | $dbr | A database connection |
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.
int | $days | This gets overwritten, so is not used |
array | $options | Query parameters for URL |
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] |
Definition at line 563 of file SpecialWatchlist.php.
References $options, array(), SpecialPage\getLanguage(), SpecialPage\getPageTitle(), Linker\linkKnown(), and SpecialPage\msg().
Referenced by cutoffLinks().
SpecialWatchlist::doHeader | ( | $ | opts, |
$ | numRows | ||
) |
Set the text to be displayed above the changes.
FormOptions | $opts | |
int | $numRows | Number of rows in the result to show after this header |
Reimplemented from ChangesListSpecialPage.
Definition at line 398 of file SpecialWatchlist.php.
References $form, $key, $name, $params, $timestamp, $user, $value, array(), as, SpecialEditWatchlist\buildTools(), Xml\checkLabel(), Xml\closeElement(), cutoffLinks(), getCustomFilters(), SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getUser(), Html\hidden(), SpecialPage\msg(), Html\namespaceSelector(), ChangesListSpecialPage\setBottomText(), setTopText(), showHideLink(), Xml\submitButton(), text, and wfTimestampNow().
SpecialWatchlist::doMainQuery | ( | $ | conds, |
$ | opts | ||
) |
Process the query.
array | $conds | |
FormOptions | $opts |
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().
SpecialWatchlist::execute | ( | $ | subpage | ) |
Main execution point.
string | $subpage |
Reimplemented from ChangesListSpecialPage.
Definition at line 40 of file SpecialWatchlist.php.
References $output, $title, $user, SpecialPage\checkPermissions(), SpecialEditWatchlist\EDIT_CLEAR, SpecialEditWatchlist\EDIT_RAW, SpecialPage\getConfig(), SpecialEditWatchlist\getMode(), ChangesListSpecialPage\getOptions(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), SpecialPage\getRequest(), SpecialPage\getTitleFor(), SpecialPage\getUser(), and SpecialPage\requireLogin().
SpecialWatchlist::fetchOptionsFromRequest | ( | $ | opts | ) | [protected] |
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.
FormOptions | $opts |
Reimplemented from ChangesListSpecialPage.
Definition at line 147 of file SpecialWatchlist.php.
References $from, $params, array(), as, and SpecialPage\getRequest().
SpecialWatchlist::getCustomFilters | ( | ) | [protected] |
Get custom show/hide filters.
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.
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.
Reimplemented from ChangesListSpecialPage.
Definition at line 106 of file SpecialWatchlist.php.
References $user, FormOptions\FLOAT, and SpecialPage\getUser().
SpecialWatchlist::hoursLink | ( | $ | h, |
$ | options = array() |
||
) | [protected] |
Definition at line 552 of file SpecialWatchlist.php.
References $options, array(), SpecialPage\getLanguage(), SpecialPage\getPageTitle(), and Linker\linkKnown().
Referenced by cutoffLinks().
SpecialWatchlist::outputChangesList | ( | $ | rows, |
$ | opts | ||
) |
Build and output the actual changes list.
ResultWrapper | $rows | Database 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.
string | $search | Prefix to search for |
int | $limit | Maximum number of results to return |
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::setTopText | ( | FormOptions $ | opts | ) |
Send the text to be displayed before the options.
Should use $this->getOutput()->addWikiText() or similar methods to print the text.
FormOptions | $opts |
Reimplemented from ChangesListSpecialPage.
Definition at line 491 of file SpecialWatchlist.php.
References $dbr, $form, $key, $user, $value, array(), as, Xml\closeElement(), countItems(), Xml\fieldset(), FormOptions\getChangedValues(), SpecialPage\getConfig(), SpecialPage\getContext(), getDB(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), SpecialPage\getUser(), Html\hidden(), ChangesListSpecialPage\makeLegend(), SpecialPage\msg(), Xml\openElement(), Xml\submitButton(), and text.
Referenced by doHeader().
SpecialWatchlist::showHideLink | ( | $ | options, |
$ | message, | ||
$ | name, | ||
$ | value | ||
) | [protected] |
Definition at line 543 of file SpecialWatchlist.php.
References $name, $options, $value, array(), SpecialPage\getPageTitle(), Linker\linkKnown(), and SpecialPage\msg().
Referenced by doHeader().