Update comments: file stuff no longer uses WikiError
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 16 Apr 2010 15:20:12 +0000 (15:20 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 16 Apr 2010 15:20:12 +0000 (15:20 +0000)
includes/filerepo/File.php
includes/filerepo/FileRepo.php
includes/filerepo/LocalFile.php

index bf08104..b0ce671 100644 (file)
@@ -843,9 +843,8 @@ abstract class File {
 
        /**
         * Move or copy a file to its public location. If a file exists at the
-        * destination, move it to an archive. Returns the archive name on success
-        * or an empty string if it was a new file, and a wikitext-formatted
-        * WikiError object on failure.
+        * destination, move it to an archive. Returns a FileRepoStatus object with
+        * the archive name in the "value" member on success.
         *
         * The archive name should be passed through to recordUpload for database
         * registration.
@@ -854,8 +853,8 @@ abstract class File {
         * @param $flags Integer: a bitwise combination of:
         *     File::DELETE_SOURCE    Delete the source file, i.e. move
         *         rather than copy
-        * @return The archive name on success or an empty string if it was a new
-        *     file, and a wikitext-formatted WikiError object on failure.
+        * @return FileRepoStatus object. On success, the value member contains the
+        *     archive name, or an empty string if it was a new file.
         *
         * STUB
         * Overridden by LocalFile
index b9ed41f..957930e 100644 (file)
@@ -494,7 +494,7 @@ abstract class FileRepo {
         * @param $srcRel Mixed: relative path for the file to be deleted
         * @param $archiveRel Mixed: relative path for the archive location.
         *        Relative to a private archive directory.
-        * @return WikiError object (wikitext-formatted), or true for success
+        * @return FileRepoStatus object
         */
        function delete( $srcRel, $archiveRel ) {
                return $this->deleteBatch( array( array( $srcRel, $archiveRel ) ) );
index 29c6b7a..d7364a5 100644 (file)
@@ -948,9 +948,8 @@ class LocalFile extends File {
 
        /**
         * Move or copy a file to its public location. If a file exists at the
-        * destination, move it to an archive. Returns the archive name on success
-        * or an empty string if it was a new file, and a wikitext-formatted
-        * WikiError object on failure.
+        * destination, move it to an archive. Returns a FileRepoStatus object with
+        * the archive name in the "value" member on success.
         *
         * The archive name should be passed through to recordUpload for database
         * registration.
@@ -1872,8 +1871,10 @@ class LocalFileMoveBatch {
        }
 
        /**
-        * Do the database updates and return a new WikiError indicating how many
-        * rows where updated.
+        * Do the database updates and return a new FileRepoStatus indicating how
+        * many rows where updated.
+        *
+        * @return FileRepoStatus
         */
        function doDBUpdates() {
                $repo = $this->file->repo;