Merge "Add Page Existance checking maintenance script"
[lhc/web/wiklou.git] / includes / FileDeleteForm.php
index 65d82b8..642c49e 100644 (file)
@@ -48,7 +48,7 @@ class FileDeleteForm {
        /**
         * Constructor
         *
-        * @param $file File object we're deleting
+        * @param File $file File object we're deleting
         */
        public function __construct( $file ) {
                $this->title = $file->getTitle();
@@ -132,12 +132,12 @@ class FileDeleteForm {
        /**
         * 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
         */
@@ -149,7 +149,7 @@ class FileDeleteForm {
 
                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();
@@ -180,7 +180,7 @@ class FileDeleteForm {
                                // 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 {
@@ -303,8 +303,8 @@ class FileDeleteForm {
         * 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;
@@ -336,6 +336,7 @@ class FileDeleteForm {
        /**
         * Is the provided `oldimage` value valid?
         *
+        * @param string $oldimage
         * @return bool
         */
        public static function isValidOldSpec( $oldimage ) {
@@ -349,9 +350,9 @@ class FileDeleteForm {
         * 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 ) {