Simplified Swift backend to use maxConns flag in MultiHttpClient
[lhc/web/wiklou.git] / includes / filebackend / FileOp.php
index 538d9b4..4e03675 100644 (file)
@@ -74,7 +74,7 @@ abstract class FileOp {
         *
         * @param FileBackendStore $backend
         * @param array $params
-        * @throws MWException
+        * @throws FileBackendError
         */
        final public function __construct( FileBackendStore $backend, array $params ) {
                $this->backend = $backend;
@@ -83,7 +83,7 @@ abstract class FileOp {
                        if ( isset( $params[$name] ) ) {
                                $this->params[$name] = $params[$name];
                        } else {
-                               throw new MWException( "File operation missing parameter '$name'." );
+                               throw new FileBackendError( "File operation missing parameter '$name'." );
                        }
                }
                foreach ( $optional as $name ) {
@@ -645,7 +645,7 @@ class CopyFileOp extends FileOp {
                        $status = Status::newGood(); // nothing to do
                } elseif ( $this->params['src'] === $this->params['dst'] ) {
                        // Just update the destination file headers
-                       $headers = $this->getParam( 'headers' ) ? : array();
+                       $headers = $this->getParam( 'headers' ) ?: array();
                        $status = $this->backend->describeInternal( $this->setFlags( array(
                                'src' => $this->params['dst'], 'headers' => $headers
                        ) ) );