https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114697
Revision: 114697
Author: aaron
Date: 2012-04-04 01:49:31 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
MFG I965de0e9a89d97ac6ee9a047daceb93946b69fa2
Modified Paths:
--------------
branches/wmf/1.19wmf1/includes/filerepo/backend/FileOp.php
Modified: branches/wmf/1.19wmf1/includes/filerepo/backend/FileOp.php
===================================================================
--- branches/wmf/1.19wmf1/includes/filerepo/backend/FileOp.php 2012-04-04
01:47:34 UTC (rev 114696)
+++ branches/wmf/1.19wmf1/includes/filerepo/backend/FileOp.php 2012-04-04
01:49:31 UTC (rev 114697)
@@ -11,7 +11,7 @@
*
* Methods called from attemptBatch() should avoid throwing exceptions at all
costs.
* FileOp objects should be lightweight in order to support large arrays in
memory.
- *
+ *
* @ingroup FileBackend
* @since 1.19
*/
@@ -74,7 +74,7 @@
/**
* Attempt a series of file operations.
* Callers are responsible for handling file locking.
- *
+ *
* $opts is an array of options, including:
* 'force' : Errors that would normally cause a rollback do not.
* The remaining operations are still attempted if any
fail.
@@ -85,10 +85,10 @@
* The resulting Status will be "OK" unless:
* a) unexpected operation errors occurred (network partitions,
disk full...)
* b) significant operation errors occured and 'force' was not set
- *
+ *
* @param $performOps Array List of FileOp operations
* @param $opts Array Batch operation options
- * @return Status
+ * @return Status
*/
final public static function attemptBatch( array $performOps, array
$opts ) {
$status = Status::newGood();
@@ -157,7 +157,7 @@
/**
* Get the value of the parameter with the given name
- *
+ *
* @param $name string
* @return mixed Returns null if the parameter is not set
*/
@@ -167,8 +167,8 @@
/**
* Check if this operation failed precheck() or attempt()
- *
- * @return bool
+ *
+ * @return bool
*/
final public function failed() {
return $this->failed;
@@ -177,7 +177,7 @@
/**
* Get a new empty predicates array for precheck()
*
- * @return Array
+ * @return Array
*/
final public static function newPredicates() {
return array( 'exists' => array(), 'sha1' => array() );
@@ -223,7 +223,7 @@
/**
* Get the file operation parameters
- *
+ *
* @return Array (required params list, optional params list)
*/
protected function allowedParams() {
@@ -266,7 +266,7 @@
* Check for errors with regards to the destination file already
existing.
* This also updates the destSameAsSource and sourceSha1 member
variables.
* A bad status will be returned if there is no chance it can be
overwritten.
- *
+ *
* @param $predicates Array
* @return Status
*/
@@ -313,10 +313,10 @@
/**
* Check if a file will exist in storage when this operation is
attempted
- *
+ *
* @param $source string Storage path
* @param $predicates Array
- * @return bool
+ * @return bool
*/
final protected function fileExists( $source, array $predicates ) {
if ( isset( $predicates['exists'][$source] ) ) {
@@ -329,10 +329,10 @@
/**
* Get the SHA-1 of a file in storage when this operation is attempted
- *
+ *
* @param $source string Storage path
* @param $predicates Array
- * @return string|false
+ * @return string|false
*/
final protected function fileSha1( $source, array $predicates ) {
if ( isset( $predicates['sha1'][$source] ) ) {
@@ -345,7 +345,7 @@
/**
* Log a file operation failure and preserve any temp files
- *
+ *
* @param $action string
* @return void
*/
@@ -410,7 +410,7 @@
set_time_limit( max( 1, $this->oldTimeout -
(int)$elapsed ) );
// If each scoped timeout is for less than one second,
we end up
// restoring the original timeout without any decrease
in value.
- // Thus web scripts in an infinite loop can run forever
unless we
+ // Thus web scripts in an infinite loop can run forever
unless we
// take some measures to prevent this. Track total time
and calls.
self::$totalElapsed += $elapsed;
--self::$stackDepth;
@@ -644,7 +644,7 @@
}
public function storagePathsChanged() {
- return array( $this->params['dst'] );
+ return array( $this->params['src'], $this->params['dst'] );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs