r96851 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96850‎ | r96851 | r96852 >
Date:15:17, 12 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Add some documentation

Swap $this->file->name for $this->file->getName()
Modified paths:
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -2083,8 +2083,19 @@
20842084 * @ingroup FileRepo
20852085 */
20862086 class LocalFileMoveBatch {
2087 - var $file, $cur, $olds, $oldCount, $archive, $target, $db;
20882087
 2088+ /**
 2089+ * @var File
 2090+ */
 2091+ var $file;
 2092+
 2093+ /**
 2094+ * @var Title
 2095+ */
 2096+ var $target;
 2097+
 2098+ var $cur, $olds, $oldCount, $archive, $db;
 2099+
20892100 function __construct( File $file, Title $target ) {
20902101 $this->file = $file;
20912102 $this->target = $target;
@@ -2160,7 +2171,7 @@
21612172
21622173 // Copy the files into their new location
21632174 $statusMove = $repo->storeBatch( $triplets );
2164 - wfDebugLog( 'imagemove', "Moved files for {$this->file->name}: {$statusMove->successCount} successes, {$statusMove->failCount} failures" );
 2175+ wfDebugLog( 'imagemove', "Moved files for {$this->file->getName()}: {$statusMove->successCount} successes, {$statusMove->failCount} failures" );
21652176 if ( !$statusMove->isGood() ) {
21662177 wfDebugLog( 'imagemove', "Error in moving files: " . $statusMove->getWikiText() );
21672178 $this->cleanupTarget( $triplets );
@@ -2170,7 +2181,7 @@
21712182
21722183 $this->db->begin();
21732184 $statusDb = $this->doDBUpdates();
2174 - wfDebugLog( 'imagemove', "Renamed {$this->file->name} in database: {$statusDb->successCount} successes, {$statusDb->failCount} failures" );
 2185+ wfDebugLog( 'imagemove', "Renamed {$this->file->getName()} in database: {$statusDb->successCount} successes, {$statusDb->failCount} failures" );
21752186 if ( !$statusDb->isGood() ) {
21762187 $this->db->rollback();
21772188 // Something went wrong with the DB updates, so remove the target files
@@ -2249,7 +2260,7 @@
22502261 // $move: (oldRelativePath, newRelativePath)
22512262 $srcUrl = $this->file->repo->getVirtualUrl() . '/public/' . rawurlencode( $move[0] );
22522263 $triplets[] = array( $srcUrl, 'public', $move[1] );
2253 - wfDebugLog( 'imagemove', "Generated move triplet for {$this->file->name}: {$srcUrl} :: public :: {$move[1]}" );
 2264+ wfDebugLog( 'imagemove', "Generated move triplet for {$this->file->getName()}: {$srcUrl} :: public :: {$move[1]}" );
22542265 }
22552266
22562267 return $triplets;

Status & tagging log