r106670 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106669‎ | r106670 | r106671 >
Date:18:26, 19 December 2011
Author:aaron
Status:deferred
Tags:
Comment:
* Fixed bogus var in doMove() and at least add delete() errors to status
* Comment tweaks
Modified paths:
  • /branches/FileBackend/phase3/includes/filerepo/backend/FSFileBackend.php (modified) (history)
  • /branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php (modified) (history)
  • /branches/FileBackend/phase3/includes/filerepo/backend/FileBackendMultiWrite.php (modified) (history)

Diff [purge]

Index: branches/FileBackend/phase3/includes/filerepo/backend/FileBackendMultiWrite.php
@@ -42,6 +42,8 @@
4343 */
4444 public function __construct( array $config ) {
4545 parent::__construct( $config );
 46+ // Construct backends here rather than via registration
 47+ // to keep these backends hidden from outside the proxy.
4648 foreach ( $config['backends'] as $index => $config ) {
4749 if ( !isset( $config['class'] ) ) {
4850 throw new MWException( 'No class given for a backend config.' );
Index: branches/FileBackend/phase3/includes/filerepo/backend/FSFileBackend.php
@@ -558,6 +558,8 @@
559559 /**
560560 * Wrapper around RecursiveDirectoryIterator that catches
561561 * exception or does any custom behavoir that we may want.
 562+ *
 563+ * @ingroup FileBackend
562564 */
563565 class FSFileIterator implements Iterator {
564566 /** @var RecursiveIteratorIterator */
Index: branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php
@@ -451,7 +451,8 @@
452452 return $status;
453453 }
454454 // Delete source (only fails due to races or medium going down)
455 - $this->backend->delete( array( 'src' => $this->params['src'] ) );
 455+ $status->merge( $this->backend->delete( array( 'src' => $params['src'] ) ) );
 456+ $status->setResult( true, $status->value ); // ignore delete() errors
456457 return $status;
457458 }
458459

Status & tagging log