MediaWiki
REL1_19
|
File deletion user interface. More...
Public Member Functions | |
__construct ($file) | |
Constructor. | |
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) |
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 = null | |
$oldfile = null | |
$oldimage = '' | |
$title = null |
File deletion user interface.
Definition at line 9 of file FileDeleteForm.php.
FileDeleteForm::__construct | ( | $ | file | ) |
Constructor.
$file | File object we're deleting |
Definition at line 32 of file FileDeleteForm.php.
References $file.
static FileDeleteForm::doDelete | ( | &$ | title, |
&$ | file, | ||
&$ | oldimage, | ||
$ | reason, | ||
$ | suppress, | ||
User $ | user = null |
||
) | [static] |
Really delete the file.
$title | Title object | |
File | $file,: | file object |
$oldimage | String: archive name | |
$reason | String: reason of the deletion | |
$suppress | Boolean: whether to mark all deleted versions as restricted | |
$user | User object performing the request |
Definition at line 126 of file FileDeleteForm.php.
References $file, $oldimage, $page, $title, $user, $wgUser, WikiPage\DELETE_SUCCESS, WikiPage\factory(), Status\newFatal(), wfEscapeWikiText(), wfGetDB(), wfMsgForContent(), and wfRunHooks().
Referenced by ApiDelete\deleteFile(), UploadFromUrlTest\deleteFile(), ApiTestCaseUpload\deleteFileByTitle(), and execute().
Fulfil the request; shows the form or deletes the file, pending authentication, confirmation, etc.
Definition at line 41 of file FileDeleteForm.php.
References $wgOut, $wgUploadMaintenance, $wgUser, doDelete(), WatchAction\doUnwatch(), WatchAction\doWatch(), Title\newMainPage(), prepareMessage(), setHeaders(), showForm(), showLogEntries(), RepoGroup\singleton(), wfMessage(), wfMsgForContent(), and wfReadOnly().
FileDeleteForm::getAction | ( | ) | [private] |
Prepare the form action.
Definition at line 335 of file FileDeleteForm.php.
Referenced by showForm().
FileDeleteForm::getTimestamp | ( | ) | [private] |
Extract the timestamp of the old version.
Definition at line 350 of file FileDeleteForm.php.
static FileDeleteForm::haveDeletableFile | ( | &$ | file, |
&$ | oldfile, | ||
$ | oldimage | ||
) | [static] |
static FileDeleteForm::isValidOldSpec | ( | $ | oldimage | ) | [static] |
Is the provided `oldimage` value valid?
Definition at line 308 of file FileDeleteForm.php.
References $oldimage.
Referenced by ApiDelete\deleteFile().
FileDeleteForm::prepareMessage | ( | $ | message | ) | [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.
$message | String: message base |
Definition at line 274 of file FileDeleteForm.php.
References $wgLang, wfEscapeWikiText(), wfExpandUrl(), and wfMsgExt().
Referenced by execute(), and showForm().
FileDeleteForm::setHeaders | ( | ) | [private] |
Set headers, titles and other bits.
Definition at line 296 of file FileDeleteForm.php.
References $wgOut, and wfMessage().
Referenced by execute().
FileDeleteForm::showForm | ( | ) | [private] |
Show the confirmation form.
Definition at line 178 of file FileDeleteForm.php.
References $title, $wgOut, $wgUser, Xml\checkLabel(), Xml\closeElement(), Xml\element(), getAction(), Html\hidden(), Xml\input(), Xml\label(), Linker\link(), Xml\listDropDown(), Title\makeTitle(), Xml\openElement(), prepareMessage(), Xml\submitButton(), wfMsg(), wfMsgForContent(), and wfMsgHtml().
Referenced by execute().
FileDeleteForm::showLogEntries | ( | ) | [private] |
Show deletion log fragments pertaining to the current file.
Definition at line 260 of file FileDeleteForm.php.
References $wgOut, LogPage\logName(), and LogEventsList\showLogExtract().
Referenced by execute().
FileDeleteForm::$file = null [private] |
Definition at line 19 of file FileDeleteForm.php.
Referenced by __construct(), doDelete(), and haveDeletableFile().
FileDeleteForm::$oldfile = null [private] |
Definition at line 24 of file FileDeleteForm.php.
Referenced by haveDeletableFile().
FileDeleteForm::$oldimage = '' [private] |
Definition at line 25 of file FileDeleteForm.php.
Referenced by doDelete(), haveDeletableFile(), and isValidOldSpec().
FileDeleteForm::$title = null [private] |
Definition at line 14 of file FileDeleteForm.php.
Referenced by doDelete(), and showForm().