/**
* 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.
* @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
* @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 ) ) );
/**
* 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.
}
/**
- * 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;