MediaWiki REL1_33
|
File deletion user interface. More...
Public Member Functions | |
__construct ( $file) | |
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, User $user=null, $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 ( $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 | |
File | $file = null |
File | $oldfile = null |
$oldimage = '' | |
Title | $title = null |
File deletion user interface.
Definition at line 31 of file FileDeleteForm.php.
FileDeleteForm::__construct | ( | $file | ) |
Definition at line 52 of file FileDeleteForm.php.
References $file, File\getTitle(), and title.
|
static |
Really delete the file.
Title | &$title | |
File | &$file | |
string | &$oldimage | Archive name |
string | $reason | Reason of the deletion |
bool | $suppress | Whether to mark all deleted versions as restricted |
User | null | $user | User object performing the request |
array | $tags | Tags to apply to the deletion action |
MWException |
Definition at line 157 of file FileDeleteForm.php.
References $oldimage, and(), DB_MASTER, wfEscapeWikiText(), wfGetDB(), and wfMessage().
Referenced by UploadFromUrlTest\deleteFile(), ApiDelete\deleteFile(), ApiUploadTestCase\deleteFileByTitle(), SpecialNuke\doDelete(), and execute().
FileDeleteForm::execute | ( | ) |
Fulfil the request; shows the form or deletes the file, pending authentication, confirmation, etc.
Definition at line 61 of file FileDeleteForm.php.
References $wgOut, $wgRequest, $wgUploadMaintenance, and(), doDelete(), WatchAction\doWatchOrUnwatch(), prepareMessage(), setHeaders(), showForm(), showLogEntries(), RepoGroup\singleton(), title, wfMessage(), and wfReadOnly().
|
private |
Prepare the form action.
Definition at line 465 of file FileDeleteForm.php.
References $oldimage, and title.
Referenced by showForm().
|
private |
Extract the timestamp of the old version.
Definition at line 481 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 454 of file FileDeleteForm.php.
References $oldfile, $oldimage, File\exists(), and File\isLocal().
|
static |
Is the provided oldimage
value valid?
string | $oldimage |
Definition at line 438 of file FileDeleteForm.php.
References $oldimage, and and().
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 403 of file FileDeleteForm.php.
References $wgLang, PROTO_CURRENT, title, wfEscapeWikiText(), wfExpandUrl(), and wfMessage().
Referenced by execute(), and showForm().
|
private |
Set headers, titles and other bits.
Definition at line 425 of file FileDeleteForm.php.
References $wgOut, title, and wfMessage().
Referenced by execute().
|
private |
Show the confirmation form.
Definition at line 246 of file FileDeleteForm.php.
References $link, $linkRenderer, $options, $wgOut, $wgRequest, and(), getAction(), prepareMessage(), text, title, and wfMessage().
Referenced by execute().
|
private |
Show deletion log fragments pertaining to the current file.
Definition at line 388 of file FileDeleteForm.php.
References $wgOut, LogEventsList\showLogExtract(), and title.
Referenced by execute().
Definition at line 41 of file FileDeleteForm.php.
Referenced by __construct().
Definition at line 46 of file FileDeleteForm.php.
Referenced by haveDeletableFile().
|
private |
Definition at line 47 of file FileDeleteForm.php.
Referenced by doDelete(), getAction(), haveDeletableFile(), and isValidOldSpec().
Definition at line 36 of file FileDeleteForm.php.