MediaWiki REL1_37
|
File deletion user interface. More...
Public Member Functions | |
__construct (LocalFile $file, IContextSource $context, ReadOnlyMode $readOnlyMode, RepoGroup $repoGroup, WatchlistManager $watchlistManager, LinkRenderer $linkRenderer, UserOptionsLookup $userOptionsLookup) | |
execute () | |
Fulfil the request; shows the form or deletes the file, pending authentication, confirmation, etc. | |
Static Public Member Functions | |
static | doDelete (&$title, &$file, &$oldimage, $reason, $suppress, UserIdentity $user, $tags=[]) |
Really delete the file. | |
static | haveDeletableFile (&$file, &$oldfile, $oldimage) |
Could we delete the file specified? If an oldimage value was provided, does it correspond to an existing, local, old version of this file? | |
static | isValidOldSpec ( $oldimage) |
Is the provided oldimage value valid? | |
Private Member Functions | |
getAction () | |
Prepare the form action. | |
getTimestamp () | |
Extract the timestamp of the old version. | |
prepareMessage (string $message) | |
Prepare a message referring to the file being deleted, showing an appropriate message depending upon whether it's a current file or an old version. | |
setHeaders () | |
Set headers, titles and other bits. | |
showForm () | |
Show the confirmation form. | |
showLogEntries () | |
Show deletion log fragments pertaining to the current file. | |
Private Attributes | |
IContextSource | $context |
LocalFile | $file |
LinkRenderer | $linkRenderer |
LocalFile null | $oldfile = null |
string | $oldimage = '' |
ReadOnlyMode | $readOnlyMode |
RepoGroup | $repoGroup |
Title | $title |
UserOptionsLookup | $userOptionsLookup |
WatchlistManager | $watchlistManager |
File deletion user interface.
Definition at line 37 of file FileDeleteForm.php.
FileDeleteForm::__construct | ( | LocalFile | $file, |
IContextSource | $context, | ||
ReadOnlyMode | $readOnlyMode, | ||
RepoGroup | $repoGroup, | ||
WatchlistManager | $watchlistManager, | ||
LinkRenderer | $linkRenderer, | ||
UserOptionsLookup | $userOptionsLookup | ||
) |
LocalFile | $file | File object we're deleting |
IContextSource | $context | |
ReadOnlyMode | $readOnlyMode | |
RepoGroup | $repoGroup | |
WatchlistManager | $watchlistManager | |
LinkRenderer | $linkRenderer | |
UserOptionsLookup | $userOptionsLookup |
Definition at line 78 of file FileDeleteForm.php.
References $context, $file, $linkRenderer, $readOnlyMode, $repoGroup, $userOptionsLookup, $watchlistManager, and File\getTitle().
|
static |
Really delete the file.
Title | &$title | |
LocalFile | &$file | |
?string | &$oldimage Archive name | |
string | $reason | Reason of the deletion |
bool | $suppress | Whether to mark all deleted versions as restricted |
UserIdentity | $user | |
string[] | $tags | Tags to apply to the deletion action |
MWException |
Definition at line 207 of file FileDeleteForm.php.
References $file, $oldimage, $title, LocalFile\deleteOldFile(), and wfMessage().
Referenced by ApiDelete\deleteFile(), and execute().
FileDeleteForm::execute | ( | ) |
Fulfil the request; shows the form or deletes the file, pending authentication, confirmation, etc.
Definition at line 101 of file FileDeleteForm.php.
References $title, doDelete(), prepareMessage(), setHeaders(), showForm(), and showLogEntries().
|
private |
|
private |
Extract the timestamp of the old version.
Definition at line 568 of file FileDeleteForm.php.
|
static |
Could we delete the file specified? If an oldimage
value was provided, does it correspond to an existing, local, old version of this file?
Definition at line 541 of file FileDeleteForm.php.
References $file.
|
static |
Is the provided oldimage
value valid?
string | $oldimage |
Definition at line 525 of file FileDeleteForm.php.
Referenced by ApiDelete\deleteFile().
|
private |
Prepare a message referring to the file being deleted, showing an appropriate message depending upon whether it's a current file or an old version.
string | $message | Message base |
Definition at line 490 of file FileDeleteForm.php.
References $lang, PROTO_CURRENT, wfEscapeWikiText(), and wfExpandUrl().
Referenced by execute().
|
private |
Set headers, titles and other bits.
Definition at line 513 of file FileDeleteForm.php.
Referenced by execute().
|
private |
Show the confirmation form.
Definition at line 302 of file FileDeleteForm.php.
Referenced by execute().
|
private |
Show deletion log fragments pertaining to the current file.
Definition at line 474 of file FileDeleteForm.php.
Referenced by execute().
|
private |
Definition at line 52 of file FileDeleteForm.php.
Referenced by __construct().
|
private |
Definition at line 43 of file FileDeleteForm.php.
Referenced by __construct(), and doDelete().
|
private |
Definition at line 64 of file FileDeleteForm.php.
Referenced by __construct().
|
private |
Definition at line 46 of file FileDeleteForm.php.
|
private |
Definition at line 49 of file FileDeleteForm.php.
Referenced by doDelete().
|
private |
Definition at line 55 of file FileDeleteForm.php.
Referenced by __construct().
|
private |
Definition at line 58 of file FileDeleteForm.php.
Referenced by __construct().
|
private |
Definition at line 40 of file FileDeleteForm.php.
Referenced by doDelete(), and execute().
|
private |
Definition at line 67 of file FileDeleteForm.php.
Referenced by __construct().
|
private |
Definition at line 61 of file FileDeleteForm.php.
Referenced by __construct().