FileDeleteForm Class Reference

File deletion user interface. More...

List of all members.

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)
static isValidOldSpec ($oldimage)
 Is the provided `oldimage` value valid?
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?

Private Member Functions

 showForm ()
 Show the confirmation form.
 showLogEntries ()
 Show deletion log fragments pertaining to the current file.
 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.
 getAction ()
 Prepare the form action.
 getTimestamp ()
 Extract the timestamp of the old version.

Private Attributes

 $title = null
 $file = null
 $oldfile = null
 $oldimage = ''


Detailed Description

File deletion user interface.

Author:
Rob Church <robchur@gmail.com>

Definition at line 9 of file FileDeleteForm.php.


Constructor & Destructor Documentation

FileDeleteForm::__construct ( file  ) 

Constructor.

Parameters:
File $file File we're deleting

Definition at line 22 of file FileDeleteForm.php.

References $file.


Member Function Documentation

static FileDeleteForm::doDelete ( &$  title,
&$  file,
&$  oldimage,
reason,
suppress 
) [static]

Definition at line 93 of file FileDeleteForm.php.

References $error, $file, $oldimage, $reason, $status, $title, $wgRequest, $wgUser, wfMsgForContent(), and wfRunHooks().

Referenced by execute().

FileDeleteForm::execute (  ) 

Fulfil the request; shows the form or deletes the file, pending authentication, confirmation, etc.

Definition at line 31 of file FileDeleteForm.php.

References $reason, $status, $wgOut, $wgRequest, $wgUser, doDelete(), Title::newMainPage(), prepareMessage(), setHeaders(), showForm(), showLogEntries(), RepoGroup::singleton(), wfMsg(), wfMsgForContent(), and wfReadOnly().

FileDeleteForm::getAction (  )  [private]

Prepare the form action.

Returns:
string

Definition at line 280 of file FileDeleteForm.php.

Referenced by showForm().

FileDeleteForm::getTimestamp (  )  [private]

Extract the timestamp of the old version.

Returns:
string

Definition at line 293 of file FileDeleteForm.php.

Referenced by prepareMessage().

static FileDeleteForm::haveDeletableFile ( &$  file,
&$  oldfile,
oldimage 
) [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?

Returns:
bool

Definition at line 269 of file FileDeleteForm.php.

References $file, $oldfile, and $oldimage.

Referenced by ApiDelete::deleteFile().

static FileDeleteForm::isValidOldSpec ( oldimage  )  [static]

Is the provided `oldimage` value valid?

Returns:
bool

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

Parameters:
string $message Message base
Returns:
string

Definition at line 221 of file FileDeleteForm.php.

References $url, $wgLang, getTimestamp(), wfExpandUrl(), and wfMsgExt().

Referenced by execute(), and showForm().

FileDeleteForm::setHeaders (  )  [private]

Set headers, titles and other bits.

Definition at line 244 of file FileDeleteForm.php.

References $wgOut, $wgUser, and wfMsg().

Referenced by execute().

FileDeleteForm::showForm (  )  [private]

FileDeleteForm::showLogEntries (  )  [private]

Show deletion log fragments pertaining to the current file.

Definition at line 207 of file FileDeleteForm.php.

References $wgOut, LogPage::logName(), and LogEventsList::showLogExtract().

Referenced by execute().


Member Data Documentation

FileDeleteForm::$file = null [private]

Definition at line 12 of file FileDeleteForm.php.

Referenced by __construct(), doDelete(), and haveDeletableFile().

FileDeleteForm::$oldfile = null [private]

Definition at line 14 of file FileDeleteForm.php.

Referenced by haveDeletableFile().

FileDeleteForm::$oldimage = '' [private]

Definition at line 15 of file FileDeleteForm.php.

Referenced by doDelete(), haveDeletableFile(), and isValidOldSpec().

FileDeleteForm::$title = null [private]

Definition at line 11 of file FileDeleteForm.php.

Referenced by doDelete().


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

Generated on Sat Sep 5 02:08:37 2009 for MediaWiki by  doxygen 1.5.9