MediaWiki
1.23.2
|
Special page allowing users with the appropriate permissions to view and restore deleted content. More...
Public Member Functions | |
__construct () | |
execute ( $par) | |
Default execute method Checks user permissions, calls the function given in mFunction. More... | |
getFileComment ( $file) | |
Fetch file upload comment if it's available to this user. More... | |
getFileLink ( $file, $titleObj, $ts, $key) | |
Fetch image view link if it's available to all users. More... | |
getFileUser ( $file) | |
Fetch file's user id if it's available to this user. More... | |
getPageLink ( $rev, $titleObj, $ts) | |
Fetch revision text link if it's available to all users. More... | |
loadRequest ( $par) | |
showDiff ( $previousRev, $currentRev) | |
Build a diff display between this and the previous either deleted or non-deleted edit. More... | |
showSearchForm () | |
undelete () | |
Public Member Functions inherited from SpecialPage | |
__construct ( $name='', $restriction='', $listed=true, $function=false, $file='default', $includable=false) | |
Default constructor for special pages Derivative classes should call this from their constructor Note that if the user does not have the required level, an error message will be displayed by the default execute() method, without the global function ever being called. More... | |
checkPermissions () | |
Checks if userCanExecute, and if not throws a PermissionsError. More... | |
checkReadOnly () | |
If the wiki is currently in readonly mode, throws a ReadOnlyError. More... | |
displayRestrictionError () | |
Output an error message telling the user what access level they have to have. More... | |
getContext () | |
Gets the context this SpecialPage is executed in. More... | |
getDescription () | |
Returns the name that goes in the <h1> in the special page itself, and also the name that will be listed in Special:Specialpages. More... | |
getFile () | |
Get the file which will be included by SpecialPage::execute() if your extension is still stuck in the past and hasn't overridden the execute() method. More... | |
getFinalGroupName () | |
Get the group that the special page belongs in on Special:SpecialPage Use this method, instead of getGroupName to allow customization of the group name from the wiki side. More... | |
getFullTitle () | |
Return the full title, including $par. More... | |
getLang () | |
Shortcut to get user's language. More... | |
getLanguage () | |
Shortcut to get user's language. More... | |
getLocalName () | |
Get the localised name of the special page. More... | |
getName () | |
Get the name of this Special Page. More... | |
getOutput () | |
Get the OutputPage being used for this instance. More... | |
getPageTitle ( $subpage=false) | |
Get a self-referential title object. More... | |
getRequest () | |
Get the WebRequest being used for this instance. More... | |
getRestriction () | |
Get the permission that a user must have to execute this page. More... | |
getSkin () | |
Shortcut to get the skin being used for this instance. More... | |
getTitle ( $subpage=false) | |
Get a self-referential title object. More... | |
getUser () | |
Shortcut to get the User executing this instance. More... | |
including ( $x=null) | |
Whether the special page is being evaluated via transclusion. More... | |
isCached () | |
Is this page cached? Expensive pages are cached or disabled in miser mode. More... | |
isExpensive () | |
Is this page expensive (for some definition of expensive)? Expensive pages are disabled or cached in miser mode. More... | |
isIncludable () | |
Whether it's allowed to transclude the special page via {{Special:Foo/params}}. More... | |
isListed () | |
Whether this special page is listed in Special:SpecialPages. More... | |
isRestricted () | |
Can be overridden by subclasses with more complicated permissions schemes. More... | |
listed ( $x=null) | |
Get or set whether this special page is listed in Special:SpecialPages. More... | |
msg () | |
Wrapper around wfMessage that sets the current context. More... | |
outputHeader ( $summaryMessageKey='') | |
Outputs a summary message on top of special pages Per default the message key is the canonical name of the special page May be overridden, i.e. More... | |
requireLogin ( $reasonMsg=null, $titleMsg=null) | |
If the user is not logged in, throws UserNotLoggedIn error. More... | |
run ( $subPage) | |
Entry point. More... | |
setContext ( $context) | |
Sets the context this SpecialPage is executed in. More... | |
setHeaders () | |
Sets headers - this should be called from the execute() method of all derived classes! More... | |
setListed ( $listed) | |
Set whether this page is listed in Special:Specialpages, at run-time. More... | |
userCanExecute (User $user) | |
Checks if the given user (identified by an object) can execute this special page (as defined by $mRestriction). More... | |
Protected Member Functions | |
getGroupName () | |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'. More... | |
Protected Member Functions inherited from SpecialPage | |
addFeedLinks ( $params) | |
Adds RSS/atom links. More... | |
afterExecute ( $subPage) | |
Gets called after. More... | |
beforeExecute ( $subPage) | |
Gets called before. More... | |
getRobotPolicy () | |
Return the robot policy. More... | |
Private Member Functions | |
diffHeader ( $rev, $prefix) | |
formatFileRow ( $row) | |
formatRevisionRow ( $row, $earliestLiveTime, $remaining) | |
showFile ( $key) | |
Show a deleted file version requested by the visitor. More... | |
showFileConfirmationForm ( $key) | |
Show a form confirming whether a tokenless user really wants to see a file. More... | |
showHistory () | |
showList ( $result) | |
Generic list of deleted pages. More... | |
showRevision ( $timestamp) | |
Private Attributes | |
$mAction | |
$mAllowed | |
$mCanView | |
$mComment | |
$mFilename | |
$mInvert | |
$mRestore | |
$mTarget | |
Title | $mTargetObj |
$mTargetTimestamp | |
$mTimestamp | |
$mToken | |
Additional Inherited Members | |
Static Public Member Functions inherited from SpecialPage | |
static | getSafeTitleFor ( $name, $subpage=false) |
Get a localised Title object for a page name with a possibly unvalidated subpage. More... | |
static | getTitleFor ( $name, $subpage=false, $fragment='') |
Get a localised Title object for a specified special page name. More... | |
Protected Attributes inherited from SpecialPage | |
IContextSource | $mContext |
Current request context. More... | |
$mIncludable | |
$mIncluding | |
$mName | |
Special page allowing users with the appropriate permissions to view and restore deleted content.
Definition at line 673 of file SpecialUndelete.php.
SpecialUndelete::__construct | ( | ) |
Definition at line 688 of file SpecialUndelete.php.
|
private |
Revision | $rev | |
string | $prefix |
Definition at line 1084 of file SpecialUndelete.php.
References $rev, $user, array(), DB_SLAVE, ChangesList\flag(), ChangeTags\formatSummaryRow(), SpecialPage\getLanguage(), SpecialPage\getPageTitle(), Linker\getRevDeleteLink(), SpecialPage\getUser(), Linker\link(), SpecialPage\msg(), Linker\revComment(), Linker\revUserTools(), TS_MW, wfGetDB(), and wfTimestamp().
Referenced by showDiff().
SpecialUndelete::execute | ( | $subPage | ) |
Default execute method Checks user permissions, calls the function given in mFunction.
This must be overridden by subclasses; it will be made abstract in a future version
string | null | $subPage |
Reimplemented from SpecialPage.
Definition at line 757 of file SpecialUndelete.php.
References $file, $out, $user, SpecialPage\checkPermissions(), File\DELETED_FILE, File\DELETED_RESTRICTED, SpecialPage\getOutput(), SpecialPage\getSkin(), SpecialPage\getUser(), loadRequest(), SpecialPage\msg(), NS_FILE, SpecialPage\outputHeader(), SpecialPage\setHeaders(), showFile(), showFileConfirmationForm(), showHistory(), showRevision(), showSearchForm(), and undelete().
|
private |
Definition at line 1456 of file SpecialUndelete.php.
References $comment, $file, $query, $user, array(), Xml\check(), File\DELETED_RESTRICTED, getFileComment(), getFileLink(), getFileUser(), SpecialPage\getLanguage(), SpecialPage\getPageTitle(), SpecialPage\getUser(), SpecialPage\msg(), ArchivedFile\newFromRow(), Linker\revDeleteLink(), Linker\revDeleteLinkDisabled(), TS_MW, and wfTimestamp().
Referenced by showHistory().
|
private |
Definition at line 1362 of file SpecialUndelete.php.
References $attribs, $comment, $last, $rev, $size, $user, array(), Xml\check(), Revision\DELETED_TEXT, ChangesList\flag(), Linker\formatRevisionSize(), ChangeTags\formatSummaryRow(), SpecialPage\getLanguage(), getPageLink(), SpecialPage\getPageTitle(), Linker\getRevDeleteLink(), SpecialPage\getUser(), Linker\linkKnown(), list, SpecialPage\msg(), Revision\newFromArchiveRow(), Linker\revComment(), Linker\revUserTools(), Xml\tags(), TS_MW, and wfTimestamp().
Referenced by showHistory().
SpecialUndelete::getFileComment | ( | $file | ) |
Fetch file upload comment if it's available to this user.
File | ArchivedFile | $file |
Definition at line 1597 of file SpecialUndelete.php.
References $file, $link, Linker\commentBlock(), File\DELETED_COMMENT, and SpecialPage\msg().
Referenced by formatFileRow().
SpecialUndelete::getFileLink | ( | $file, | |
$titleObj, | |||
$ts, | |||
$key | |||
) |
Fetch image view link if it's available to all users.
File | ArchivedFile | $file | |
Title | $titleObj | |
string | $ts | A timestamp |
string | $key | a storage key |
Definition at line 1542 of file SpecialUndelete.php.
References $file, $link, $time, $user, array(), File\DELETED_FILE, SpecialPage\getLanguage(), SpecialPage\getUser(), and Linker\linkKnown().
Referenced by formatFileRow().
SpecialUndelete::getFileUser | ( | $file | ) |
Fetch file's user id if it's available to this user.
File | ArchivedFile | $file |
Definition at line 1574 of file SpecialUndelete.php.
References $file, $link, File\DELETED_USER, SpecialPage\msg(), Linker\userLink(), and Linker\userToolLinks().
Referenced by formatFileRow().
|
protected |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.
Reimplemented from SpecialPage.
Definition at line 1670 of file SpecialUndelete.php.
SpecialUndelete::getPageLink | ( | $rev, | |
$titleObj, | |||
$ts | |||
) |
Fetch revision text link if it's available to all users.
Definition at line 1507 of file SpecialUndelete.php.
References $link, $rev, $time, $user, array(), Revision\DELETED_TEXT, SpecialPage\getLanguage(), SpecialPage\getUser(), and Linker\linkKnown().
Referenced by formatRevisionRow().
SpecialUndelete::loadRequest | ( | $par | ) |
Definition at line 692 of file SpecialUndelete.php.
References $matches, $time, $user, array(), as, SpecialPage\getRequest(), SpecialPage\getUser(), Title\newFromURL(), TS_MW, and wfTimestamp().
Referenced by execute().
SpecialUndelete::showDiff | ( | $previousRev, | |
$currentRev | |||
) |
Build a diff display between this and the previous either deleted or non-deleted edit.
Definition at line 1057 of file SpecialUndelete.php.
References diffHeader(), WikiPage\factory(), Revision\FOR_THIS_USER, SpecialPage\getContext(), and SpecialPage\getOutput().
Referenced by showRevision().
|
private |
Show a deleted file version requested by the visitor.
Definition at line 1174 of file SpecialUndelete.php.
References $path, $response, SpecialPage\getOutput(), SpecialPage\getRequest(), and RepoGroup\singleton().
Referenced by execute().
|
private |
Show a form confirming whether a tokenless user really wants to see a file.
Definition at line 1147 of file SpecialUndelete.php.
References $file, $out, $user, array(), SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), SpecialPage\getUser(), SpecialPage\msg(), Xml\openElement(), Xml\submitButton(), and text.
Referenced by execute().
|
private |
Definition at line 1191 of file SpecialUndelete.php.
References $batch, $files, $out, array(), as, Xml\checkLabel(), Xml\closeElement(), Xml\element(), Xml\fieldset(), formatFileRow(), formatRevisionRow(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), SpecialPage\getUser(), Html\hidden(), Xml\input(), Xml\label(), Title\makeTitleSafe(), SpecialPage\msg(), NS_USER, NS_USER_TALK, Xml\openElement(), LogEventsList\showLogExtract(), Xml\submitButton(), text, wfEscapeWikiText(), and wfRunHooks().
Referenced by execute().
|
private |
Generic list of deleted pages.
ResultWrapper | $result |
Definition at line 850 of file SpecialUndelete.php.
References $out, $title, array(), as, Html\element(), SpecialPage\getContext(), Linker\getInvalidTitleDescription(), SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), Linker\linkKnown(), Title\makeTitleSafe(), and SpecialPage\msg().
Referenced by showSearchForm().
|
private |
Definition at line 893 of file SpecialUndelete.php.
References $link, $out, $rev, $t, $time, $timestamp, $user, array(), Xml\closeElement(), Revision\DELETED_TEXT, Xml\element(), Revision\FOR_THIS_USER, SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), Linker\getRevDeleteLink(), SpecialPage\getUser(), Linker\linkKnown(), SpecialPage\msg(), Xml\openElement(), Linker\revUserTools(), showDiff(), text, true, and wfRunHooks().
Referenced by execute().
SpecialUndelete::showSearchForm | ( | ) |
Definition at line 812 of file SpecialUndelete.php.
References $out, array(), Xml\closeElement(), Xml\fieldset(), SpecialPage\getOutput(), SpecialPage\getPageTitle(), global, Html\hidden(), Xml\input(), PageArchive\listPagesByPrefix(), SpecialPage\msg(), Xml\openElement(), Html\rawElement(), showList(), Xml\submitButton(), and text.
Referenced by execute().
SpecialUndelete::undelete | ( | ) |
Definition at line 1612 of file SpecialUndelete.php.
References $link, $ok, $out, array(), SpecialPage\getOutput(), SpecialPage\getUser(), global, Linker\linkKnown(), SpecialPage\msg(), NS_FILE, wfReadOnly(), and wfRunHooks().
Referenced by execute().
|
private |
Definition at line 674 of file SpecialUndelete.php.
|
private |
Definition at line 681 of file SpecialUndelete.php.
|
private |
Definition at line 682 of file SpecialUndelete.php.
|
private |
Definition at line 683 of file SpecialUndelete.php.
|
private |
Definition at line 679 of file SpecialUndelete.php.
|
private |
Definition at line 678 of file SpecialUndelete.php.
|
private |
Definition at line 677 of file SpecialUndelete.php.
|
private |
Definition at line 675 of file SpecialUndelete.php.
|
private |
Definition at line 686 of file SpecialUndelete.php.
|
private |
Definition at line 680 of file SpecialUndelete.php.
|
private |
Definition at line 676 of file SpecialUndelete.php.
|
private |
Definition at line 684 of file SpecialUndelete.php.