MediaWiki
master
|
File deletion user interface. More...
Public Member Functions | |
__construct ( $file, User $user, OutputPage $out) | |
execute () | |
Fulfil the request; shows the form or deletes the file, pending authentication, confirmation, etc. More... | |
Static Public Member Functions | |
static | doDelete (&$title, &$file, &$oldimage, $reason, $suppress, User $user, $tags=[]) |
Really delete the file. More... | |
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? More... | |
static | isValidOldSpec ( $oldimage) |
Is the provided oldimage value valid? More... | |
Private Member Functions | |
getAction () | |
Prepare the form action. More... | |
getTimestamp () | |
Extract the timestamp of the old version. More... | |
prepareMessage ( $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. More... | |
setHeaders () | |
Set headers, titles and other bits. More... | |
showForm () | |
Show the confirmation form. More... | |
showLogEntries () | |
Show deletion log fragments pertaining to the current file. More... | |
Private Attributes | |
LocalFile | $file = null |
LocalFile | $oldfile = null |
string | $oldimage = '' |
OutputPage | $out = null |
Title | $title = null |
User | $user = null |
File deletion user interface.
Definition at line 31 of file FileDeleteForm.php.
FileDeleteForm::__construct | ( | $file, | |
User | $user, | ||
OutputPage | $out | ||
) |
LocalFile | $file | File object we're deleting |
User | $user | |
OutputPage | $out |
Definition at line 56 of file FileDeleteForm.php.
References $file, $out, $user, 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 |
User | $user | |
string[] | $tags | Tags to apply to the deletion action |
MWException |
Definition at line 174 of file FileDeleteForm.php.
References $file, $oldimage, $title, $user, DB_MASTER, LocalFile\deleteFile(), LocalFile\deleteOldFile(), Title\getPrefixedText(), StatusValue\newFatal(), Hooks\runner(), wfEscapeWikiText(), wfGetDB(), 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 67 of file FileDeleteForm.php.
References $wgRequest, $wgUploadMaintenance, doDelete(), WatchAction\doWatchOrUnwatch(), Title\newMainPage(), prepareMessage(), setHeaders(), showForm(), showLogEntries(), wfMessage(), and wfReadOnly().
|
private |
Prepare the form action.
Definition at line 509 of file FileDeleteForm.php.
References $oldimage.
Referenced by showForm().
|
private |
Extract the timestamp of the old version.
Definition at line 525 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 498 of file FileDeleteForm.php.
References $file, $oldfile, $oldimage, LocalFile\exists(), and File\isLocal().
|
static |
Is the provided oldimage
value valid?
string | $oldimage |
Definition at line 482 of file FileDeleteForm.php.
References $oldimage.
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 448 of file FileDeleteForm.php.
References $wgLang, PROTO_CURRENT, wfEscapeWikiText(), wfExpandUrl(), and wfMessage().
Referenced by execute(), and showForm().
|
private |
Set headers, titles and other bits.
Definition at line 470 of file FileDeleteForm.php.
References wfMessage().
Referenced by execute().
|
private |
Show the confirmation form.
Definition at line 266 of file FileDeleteForm.php.
References $wgRequest, CommentStore\COMMENT_CHARACTER_LIMIT, getAction(), Html\hidden(), Xml\listDropDownOptions(), Xml\listDropDownOptionsOoui(), and prepareMessage().
Referenced by execute().
|
private |
Show deletion log fragments pertaining to the current file.
Definition at line 430 of file FileDeleteForm.php.
References LogEventsList\showLogExtract().
Referenced by execute().
|
private |
Definition at line 37 of file FileDeleteForm.php.
Referenced by __construct(), doDelete(), and haveDeletableFile().
|
private |
Definition at line 43 of file FileDeleteForm.php.
Referenced by haveDeletableFile().
|
private |
Definition at line 46 of file FileDeleteForm.php.
Referenced by doDelete(), getAction(), haveDeletableFile(), and isValidOldSpec().
|
private |
Definition at line 49 of file FileDeleteForm.php.
Referenced by __construct().
|
private |
Definition at line 34 of file FileDeleteForm.php.
Referenced by doDelete().
|
private |
Definition at line 40 of file FileDeleteForm.php.
Referenced by __construct(), and doDelete().