/**
* Constructor
*
- * @param $file File object we're deleting
+ * @param File $file File object we're deleting
*/
public function __construct( $file ) {
$this->title = $file->getTitle();
/**
* Really delete the file
*
- * @param $title Title object
- * @param File $file: file object
- * @param string $oldimage archive name
- * @param string $reason reason of the deletion
- * @param $suppress Boolean: whether to mark all deleted versions as restricted
- * @param $user User object performing the request
+ * @param Title $title
+ * @param File $file
+ * @param string $oldimage Archive name
+ * @param string $reason Reason of the deletion
+ * @param bool $suppress Whether to mark all deleted versions as restricted
+ * @param User $user User object performing the request
* @throws MWException
* @return bool|Status
*/
if ( $oldimage ) {
$page = null;
- $status = $file->deleteOld( $oldimage, $reason, $suppress );
+ $status = $file->deleteOld( $oldimage, $reason, $suppress, $user );
if ( $status->ok ) {
// Need to do a log item
$logComment = wfMessage( 'deletedrevision', $oldimage )->inContentLanguage()->text();
// doDeleteArticleReal() returns a non-fatal error status if the page
// or revision is missing, so check for isOK() rather than isGood()
if ( $deleteStatus->isOK() ) {
- $status = $file->delete( $reason, $suppress );
+ $status = $file->delete( $reason, $suppress, $user );
if ( $status->isOK() ) {
$dbw->commit( __METHOD__ );
} else {
* showing an appropriate message depending upon whether
* it's a current file or an old version
*
- * @param string $message message base
- * @return String
+ * @param string $message Message base
+ * @return string
*/
private function prepareMessage( $message ) {
global $wgLang;
/**
* Is the provided `oldimage` value valid?
*
+ * @param string $oldimage
* @return bool
*/
public static function isValidOldSpec( $oldimage ) {
* value was provided, does it correspond to an
* existing, local, old version of this file?
*
- * @param $file File
- * @param $oldfile File
- * @param $oldimage File
+ * @param File $file
+ * @param File $oldfile
+ * @param File $oldimage
* @return bool
*/
public static function haveDeletableFile( &$file, &$oldfile, $oldimage ) {