Add some documentation
authorSam Reed <reedy@users.mediawiki.org>
Mon, 12 Sep 2011 15:17:16 +0000 (15:17 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 12 Sep 2011 15:17:16 +0000 (15:17 +0000)
Swap $this->file->name for $this->file->getName()

includes/filerepo/LocalFile.php

index 001cace..767e762 100644 (file)
@@ -2083,7 +2083,18 @@ class LocalFileRestoreBatch {
  * @ingroup FileRepo
  */
 class LocalFileMoveBatch {
-       var $file, $cur, $olds, $oldCount, $archive, $target, $db;
+
+       /**
+        * @var File
+        */
+       var $file;
+
+       /**
+        * @var Title
+        */
+       var $target;
+
+       var $cur, $olds, $oldCount, $archive, $db;
 
        function __construct( File $file, Title $target ) {
                $this->file = $file;
@@ -2160,7 +2171,7 @@ class LocalFileMoveBatch {
 
                // Copy the files into their new location
                $statusMove = $repo->storeBatch( $triplets );
-               wfDebugLog( 'imagemove', "Moved files for {$this->file->name}: {$statusMove->successCount} successes, {$statusMove->failCount} failures" );
+               wfDebugLog( 'imagemove', "Moved files for {$this->file->getName()}: {$statusMove->successCount} successes, {$statusMove->failCount} failures" );
                if ( !$statusMove->isGood() ) {
                        wfDebugLog( 'imagemove', "Error in moving files: " . $statusMove->getWikiText() );
                        $this->cleanupTarget( $triplets );
@@ -2170,7 +2181,7 @@ class LocalFileMoveBatch {
 
                $this->db->begin();
                $statusDb = $this->doDBUpdates();
-               wfDebugLog( 'imagemove', "Renamed {$this->file->name} in database: {$statusDb->successCount} successes, {$statusDb->failCount} failures" );
+               wfDebugLog( 'imagemove', "Renamed {$this->file->getName()} in database: {$statusDb->successCount} successes, {$statusDb->failCount} failures" );
                if ( !$statusDb->isGood() ) {
                        $this->db->rollback();
                        // Something went wrong with the DB updates, so remove the target files
@@ -2249,7 +2260,7 @@ class LocalFileMoveBatch {
                        // $move: (oldRelativePath, newRelativePath)
                        $srcUrl = $this->file->repo->getVirtualUrl() . '/public/' . rawurlencode( $move[0] );
                        $triplets[] = array( $srcUrl, 'public', $move[1] );
-                       wfDebugLog( 'imagemove', "Generated move triplet for {$this->file->name}: {$srcUrl} :: public :: {$move[1]}" );
+                       wfDebugLog( 'imagemove', "Generated move triplet for {$this->file->getName()}: {$srcUrl} :: public :: {$move[1]}" );
                }
 
                return $triplets;