MediaWiki
REL1_23
|
Provides the UI through which users can perform editing operations on their watchlist. More...
Public Member Functions | |
__construct () | |
execute ($mode) | |
Main execution point. | |
submitClear ($data) | |
submitNormal ($data) | |
submitRaw ($data) | |
Static Public Member Functions | |
static | buildTools ($unused) |
Build a set of links for convenient navigation between watchlist viewing and editing modes. | |
static | getMode ($request, $par) |
Determine whether we are editing the watchlist, and if so, what kind of editing operation. | |
Public Attributes | |
const | EDIT_CLEAR = 1 |
Editing modes. | |
const | EDIT_NORMAL = 3 |
const | EDIT_RAW = 2 |
Protected Member Functions | |
getClearForm () | |
Get a form for clearing the watchlist. | |
getNormalForm () | |
Get the standard watchlist editing form. | |
getRawForm () | |
Get a form for editing the watchlist in "raw" mode. | |
Protected Attributes | |
$successMessage | |
$toc | |
Private Member Functions | |
buildRemoveLine ($title) | |
Build the label for a checkbox, with a link to the title, and various additional bits. | |
checkTitle ($title, $namespace, $dbKey) | |
Validates watchlist entry. | |
cleanupWatchlist () | |
Attempts to clean up broken items. | |
clearWatchlist () | |
Remove all titles from a user's watchlist. | |
extractTitles ($list) | |
Extract a list of titles from a blob of text, returning (prefixed) strings; unwatchable titles are ignored. | |
getWatchlist () | |
Prepare a list of titles on a user's watchlist (excluding talk pages) and return an array of (prefixed) strings. | |
getWatchlistInfo () | |
Get a list of titles on a user's watchlist, excluding talk pages, and return as a two-dimensional array with namespace and title. | |
showTitles ($titles, &$output) | |
Print out a list of linked titles. | |
unwatchTitles ($titles) | |
Remove a list of titles from a user's watchlist. | |
watchTitles ($titles) | |
Add a list of titles to a user's watchlist. | |
Private Attributes | |
$badItems = array() |
Provides the UI through which users can perform editing operations on their watchlist.
Definition at line 37 of file SpecialEditWatchlist.php.
Definition at line 52 of file SpecialEditWatchlist.php.
SpecialEditWatchlist::buildRemoveLine | ( | $ | title | ) | [private] |
Build the label for a checkbox, with a link to the title, and various additional bits.
$title | Title |
Definition at line 579 of file SpecialEditWatchlist.php.
References $link, $title, $tools, array(), SpecialPage\getLanguage(), SpecialPage\getSkin(), SpecialPage\getTitleFor(), Linker\link(), Linker\linkKnown(), SpecialPage\msg(), and wfRunHooks().
Referenced by getNormalForm().
static SpecialEditWatchlist::buildTools | ( | $ | unused | ) | [static] |
Build a set of links for convenient navigation between watchlist viewing and editing modes.
$unused |
Definition at line 689 of file SpecialEditWatchlist.php.
References $tools, $wgLang, array(), as, SpecialPage\getTitleFor(), global, Linker\linkKnown(), Html\rawElement(), text, and wfMessage().
Referenced by SpecialWatchlist\doHeader(), and execute().
SpecialEditWatchlist::checkTitle | ( | $ | title, |
$ | namespace, | ||
$ | dbKey | ||
) | [private] |
Validates watchlist entry.
Title | $title | |
int | $namespace | |
string | $dbKey |
Definition at line 347 of file SpecialEditWatchlist.php.
References $title, and array().
Referenced by getNormalForm(), and getWatchlist().
SpecialEditWatchlist::cleanupWatchlist | ( | ) | [private] |
Attempts to clean up broken items.
Definition at line 369 of file SpecialEditWatchlist.php.
References $title, $user, array(), as, SpecialPage\getUser(), list, wfDebug(), and wfGetDB().
Referenced by getNormalForm(), and getWatchlist().
SpecialEditWatchlist::clearWatchlist | ( | ) | [private] |
Remove all titles from a user's watchlist.
Definition at line 401 of file SpecialEditWatchlist.php.
References array(), SpecialPage\getUser(), and wfGetDB().
Referenced by submitClear(), and submitRaw().
SpecialEditWatchlist::execute | ( | $ | mode | ) |
Main execution point.
$mode | int |
Reimplemented from SpecialPage.
Definition at line 61 of file SpecialEditWatchlist.php.
References $form, $out, buildTools(), SpecialPage\checkPermissions(), SpecialPage\checkReadOnly(), getClearForm(), getMode(), SpecialPage\getName(), getNormalForm(), SpecialPage\getOutput(), getRawForm(), SpecialPage\getRequest(), SpecialPage\getTitleFor(), SpecialPage\getUser(), SpecialPage\msg(), SpecialPage\outputHeader(), SpecialPage\requireLogin(), and SpecialPage\setHeaders().
SpecialEditWatchlist::extractTitles | ( | $ | list | ) | [private] |
Extract a list of titles from a blob of text, returning (prefixed) strings; unwatchable titles are ignored.
$list | String |
Definition at line 126 of file SpecialEditWatchlist.php.
References $title, $titles, array(), as, Title\newFromText(), and GenderCache\singleton().
Referenced by submitRaw().
SpecialEditWatchlist::getClearForm | ( | ) | [protected] |
Get a form for clearing the watchlist.
Definition at line 642 of file SpecialEditWatchlist.php.
References $form, array(), SpecialPage\getContext(), SpecialPage\getPageTitle(), and SpecialPage\msg().
Referenced by execute().
static SpecialEditWatchlist::getMode | ( | $ | request, |
$ | par | ||
) | [static] |
Determine whether we are editing the watchlist, and if so, what kind of editing operation.
$request | WebRequest |
$par | mixed |
Definition at line 664 of file SpecialEditWatchlist.php.
References EDIT_CLEAR, EDIT_NORMAL, and EDIT_RAW.
Referenced by SpecialWatchlist\execute(), and execute().
SpecialEditWatchlist::getNormalForm | ( | ) | [protected] |
Get the standard watchlist editing form.
Definition at line 513 of file SpecialEditWatchlist.php.
References $count, $form, $title, $wgContLang, array(), as, buildRemoveLine(), checkTitle(), cleanupWatchlist(), SpecialPage\getContext(), SpecialPage\getLanguage(), SpecialPage\getPageTitle(), getWatchlistInfo(), global, Title\makeTitleSafe(), SpecialPage\msg(), Linker\tocIndent(), Linker\tocLine(), Linker\tocLineEnd(), and Linker\tocList().
Referenced by execute().
SpecialEditWatchlist::getRawForm | ( | ) | [protected] |
Get a form for editing the watchlist in "raw" mode.
Definition at line 615 of file SpecialEditWatchlist.php.
References $form, $titles, array(), SpecialPage\getContext(), SpecialPage\getPageTitle(), getWatchlist(), and SpecialPage\msg().
Referenced by execute().
SpecialEditWatchlist::getWatchlist | ( | ) | [private] |
Prepare a list of titles on a user's watchlist (excluding talk pages) and return an array of (prefixed) strings.
Definition at line 268 of file SpecialEditWatchlist.php.
References $dbr, $res, $title, $titles, array(), as, checkTitle(), cleanupWatchlist(), SpecialPage\getUser(), Title\makeTitleSafe(), GenderCache\singleton(), and wfGetDB().
Referenced by getRawForm(), submitClear(), and submitRaw().
SpecialEditWatchlist::getWatchlistInfo | ( | ) | [private] |
Get a list of titles on a user's watchlist, excluding talk pages, and return as a two-dimensional array with namespace and title.
Definition at line 313 of file SpecialEditWatchlist.php.
References $dbr, $lb, $res, $titles, array(), as, SpecialPage\getUser(), MWNamespace\isTalk(), and wfGetDB().
Referenced by getNormalForm().
SpecialEditWatchlist::showTitles | ( | $ | titles, |
&$ | output | ||
) | [private] |
Print out a list of linked titles.
$titles can be an array of strings or Title objects; the former is preferred, since Titles are very memory-heavy
array | $titles | of strings, or Title objects |
$output | String |
Definition at line 222 of file SpecialEditWatchlist.php.
References $batch, $output, $title, $titles, as, Linker\link(), SpecialPage\msg(), Title\newFromText(), and wfMessage().
Referenced by submitClear(), submitNormal(), and submitRaw().
SpecialEditWatchlist::submitClear | ( | $ | data | ) |
Definition at line 201 of file SpecialEditWatchlist.php.
References clearWatchlist(), SpecialPage\getUser(), getWatchlist(), SpecialPage\msg(), and showTitles().
SpecialEditWatchlist::submitNormal | ( | $ | data | ) |
Definition at line 489 of file SpecialEditWatchlist.php.
References $titles, array(), as, SpecialPage\msg(), showTitles(), and unwatchTitles().
SpecialEditWatchlist::submitRaw | ( | $ | data | ) |
Definition at line 155 of file SpecialEditWatchlist.php.
References clearWatchlist(), extractTitles(), SpecialPage\getUser(), getWatchlist(), SpecialPage\msg(), showTitles(), unwatchTitles(), and watchTitles().
SpecialEditWatchlist::unwatchTitles | ( | $ | titles | ) | [private] |
Remove a list of titles from a user's watchlist.
$titles can be an array of strings or Title objects; the former is preferred, since Titles are very memory-heavy
array | $titles | of strings, or Title objects |
Definition at line 454 of file SpecialEditWatchlist.php.
References $title, $titles, array(), as, WikiPage\factory(), MWNamespace\getSubject(), MWNamespace\getTalk(), SpecialPage\getUser(), Title\newFromText(), wfGetDB(), and wfRunHooks().
Referenced by submitNormal(), and submitRaw().
SpecialEditWatchlist::watchTitles | ( | $ | titles | ) | [private] |
Add a list of titles to a user's watchlist.
$titles can be an array of strings or Title objects; the former is preferred, since Titles are very memory-heavy
array | $titles | of strings, or Title objects |
Definition at line 418 of file SpecialEditWatchlist.php.
References $title, $titles, array(), as, MWNamespace\getSubject(), MWNamespace\getTalk(), SpecialPage\getUser(), Title\newFromText(), and wfGetDB().
Referenced by submitRaw().
SpecialEditWatchlist::$badItems = array() [private] |
Definition at line 50 of file SpecialEditWatchlist.php.
SpecialEditWatchlist::$successMessage [protected] |
Definition at line 46 of file SpecialEditWatchlist.php.
SpecialEditWatchlist::$toc [protected] |
Definition at line 48 of file SpecialEditWatchlist.php.
const SpecialEditWatchlist::EDIT_CLEAR = 1 |
Editing modes.
EDIT_CLEAR is no longer used; the "Clear" link scared people too much. Now it's passed on to the raw editor, from which it's very easy to clear.
Definition at line 42 of file SpecialEditWatchlist.php.
Referenced by SpecialWatchlist\execute(), and getMode().
const SpecialEditWatchlist::EDIT_NORMAL = 3 |
Definition at line 44 of file SpecialEditWatchlist.php.
Referenced by getMode().
const SpecialEditWatchlist::EDIT_RAW = 2 |
Definition at line 43 of file SpecialEditWatchlist.php.
Referenced by SpecialWatchlist\execute(), and getMode().