MediaWiki  REL1_24
SpecialUndelete Class Reference

Special page allowing users with the appropriate permissions to view and restore deleted content. More...

Inheritance diagram for SpecialUndelete:
Collaboration diagram for SpecialUndelete:

List of all members.

Public Member Functions

 __construct ()
 execute ($par)
 Default execute method Checks user permissions.
 getFileComment ($file)
 Fetch file upload comment if it's available to this user.
 getFileLink ($file, $titleObj, $ts, $key)
 Fetch image view link if it's available to all users.
 getFileUser ($file)
 Fetch file's user id if it's available to this user.
 getPageLink ($rev, $titleObj, $ts)
 Fetch revision text link if it's available to all users.
 loadRequest ($par)
 showDiff ($previousRev, $currentRev)
 Build a diff display between this and the previous either deleted or non-deleted edit.
 showSearchForm ()
 undelete ()
 userCanExecute (User $user)
 Checks if the given user (identified by an object) can execute this special page (as defined by $mRestriction).

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'.

Private Member Functions

 diffHeader ($rev, $prefix)
 formatFileRow ($row)
 formatRevisionRow ($row, $earliestLiveTime, $remaining)
 isAllowed ($permission, User $user=null)
 Checks whether a user is allowed the permission for the specific title if one is set.
 showFile ($key)
 Show a deleted file version requested by the visitor.
 showFileConfirmationForm ($key)
 Show a form confirming whether a tokenless user really wants to see a file.
 showHistory ()
 showList ($result)
 Generic list of deleted pages.
 showRevision ($timestamp)

Private Attributes

 $mAction
 $mAllowed
 $mCanView
 $mComment
 $mFilename
 $mInvert
 $mRestore
 $mTarget
Title $mTargetObj
 *
 $mTargetTimestamp
 $mTimestamp
 $mToken

Detailed Description

Special page allowing users with the appropriate permissions to view and restore deleted content.

Definition at line 661 of file SpecialUndelete.php.


Constructor & Destructor Documentation

Definition at line 676 of file SpecialUndelete.php.

Referenced by loadRequest().


Member Function Documentation

SpecialUndelete::diffHeader ( rev,
prefix 
) [private]
Parameters:
Revision$rev
string$prefix
Returns:
string

Definition at line 1093 of file SpecialUndelete.php.

SpecialUndelete::execute ( subPage)

Default execute method Checks user permissions.

This must be overridden by subclasses; it will be made abstract in a future version

Parameters:
string | null$subPage

Reimplemented from SpecialPage.

Definition at line 766 of file SpecialUndelete.php.

References isAllowed().

SpecialUndelete::formatFileRow ( row) [private]

Definition at line 1467 of file SpecialUndelete.php.

SpecialUndelete::formatRevisionRow ( row,
earliestLiveTime,
remaining 
) [private]

Definition at line 1373 of file SpecialUndelete.php.

Fetch file upload comment if it's available to this user.

Parameters:
File | ArchivedFile$file
Returns:
string HTML fragment

Definition at line 1610 of file SpecialUndelete.php.

SpecialUndelete::getFileLink ( file,
titleObj,
ts,
key 
)

Fetch image view link if it's available to all users.

Parameters:
File | ArchivedFile$file
Title$titleObj
string$tsA timestamp
string$keyA storage key
Returns:
string HTML fragment

Definition at line 1555 of file SpecialUndelete.php.

Fetch file's user id if it's available to this user.

Parameters:
File | ArchivedFile$file
Returns:
string HTML fragment

Definition at line 1587 of file SpecialUndelete.php.

Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Returns:
string
Since:
1.21

Reimplemented from SpecialPage.

Definition at line 1681 of file SpecialUndelete.php.

SpecialUndelete::getPageLink ( rev,
titleObj,
ts 
)

Fetch revision text link if it's available to all users.

Parameters:
Revision$rev
Title$titleObj
string$tsTimestamp
Returns:
string

Definition at line 1520 of file SpecialUndelete.php.

SpecialUndelete::isAllowed ( permission,
User user = null 
) [private]

Checks whether a user is allowed the permission for the specific title if one is set.

Parameters:
string$permission
User$user
Returns:
bool

Definition at line 753 of file SpecialUndelete.php.

Referenced by execute().

Definition at line 680 of file SpecialUndelete.php.

References __construct().

SpecialUndelete::showDiff ( previousRev,
currentRev 
)

Build a diff display between this and the previous either deleted or non-deleted edit.

Parameters:
Revision$previousRev
Revision$currentRev
Returns:
string HTML

Definition at line 1066 of file SpecialUndelete.php.

SpecialUndelete::showFile ( key) [private]

Show a deleted file version requested by the visitor.

Parameters:
string$key

Definition at line 1185 of file SpecialUndelete.php.

References $response, SpecialPage\getOutput(), and SpecialPage\getRequest().

Show a form confirming whether a tokenless user really wants to see a file.

Parameters:
string$key

Definition at line 1157 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.

Definition at line 1202 of file SpecialUndelete.php.

SpecialUndelete::showList ( result) [private]

Generic list of deleted pages.

Parameters:
ResultWrapper$result
Returns:
bool

Definition at line 857 of file SpecialUndelete.php.

SpecialUndelete::showRevision ( timestamp) [private]

Definition at line 900 of file SpecialUndelete.php.

Definition at line 821 of file SpecialUndelete.php.

Definition at line 1625 of file SpecialUndelete.php.

Checks if the given user (identified by an object) can execute this special page (as defined by $mRestriction).

Can be overridden by sub- classes with more complicated permissions schemes.

Parameters:
User$userThe user to check
Returns:
bool Does the user have permission to view the page?

Reimplemented from SpecialPage.

Definition at line 762 of file SpecialUndelete.php.


Member Data Documentation

SpecialUndelete::$mAction [private]

Definition at line 662 of file SpecialUndelete.php.

SpecialUndelete::$mAllowed [private]

Definition at line 669 of file SpecialUndelete.php.

SpecialUndelete::$mCanView [private]

Definition at line 670 of file SpecialUndelete.php.

SpecialUndelete::$mComment [private]

Definition at line 671 of file SpecialUndelete.php.

SpecialUndelete::$mFilename [private]

Definition at line 667 of file SpecialUndelete.php.

SpecialUndelete::$mInvert [private]

Definition at line 666 of file SpecialUndelete.php.

SpecialUndelete::$mRestore [private]

Definition at line 665 of file SpecialUndelete.php.

SpecialUndelete::$mTarget [private]

Definition at line 663 of file SpecialUndelete.php.

Title SpecialUndelete::$mTargetObj [private]

*

Definition at line 674 of file SpecialUndelete.php.

SpecialUndelete::$mTargetTimestamp [private]

Definition at line 668 of file SpecialUndelete.php.

SpecialUndelete::$mTimestamp [private]

Definition at line 664 of file SpecialUndelete.php.

SpecialUndelete::$mToken [private]

Definition at line 672 of file SpecialUndelete.php.


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