* Added backend name to 'backend-fail-internal' message
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 12 Jan 2012 20:05:25 +0000 (20:05 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 12 Jan 2012 20:05:25 +0000 (20:05 +0000)
* Removed TODO comment in SwiftFileBackend

includes/filerepo/backend/SwiftFileBackend.php
languages/messages/MessagesEn.php

index 8838185..e9bbb4e 100644 (file)
  * Status messages should avoid mentioning the Swift account name
  * Likewise, error suppression should be used to avoid path disclosure.
  *
- * This requires the php-cloudfiles library is present,
+ * This requires that the php-cloudfiles library is present,
  * which is available at https://github.com/rackspace/php-cloudfiles.
  * All of the library classes must be registed in $wgAutoloadClasses.
  *
- * @TODO: update MessagesEn for status errors.
  * @TODO: handle 'latest' param as "X-Newest: true".
  *
  * @ingroup FileBackend
@@ -95,7 +94,7 @@ class SwiftFileBackend extends FileBackend {
                        $status->fatal( 'backend-fail-connect', $this->name );
                        return $status;
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                        return $status;
                }
@@ -114,7 +113,7 @@ class SwiftFileBackend extends FileBackend {
                        $status->fatal( 'backend-fail-connect', $this->name );
                        return $status;
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                        return $status;
                }
@@ -133,7 +132,7 @@ class SwiftFileBackend extends FileBackend {
                } catch ( InvalidResponseException $e ) {
                        $status->fatal( 'backend-fail-connect', $this->name );
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                }
 
@@ -169,7 +168,7 @@ class SwiftFileBackend extends FileBackend {
                        $status->fatal( 'backend-fail-connect', $this->name );
                        return $status;
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                        return $status;
                }
@@ -188,7 +187,7 @@ class SwiftFileBackend extends FileBackend {
                        $status->fatal( 'backend-fail-connect', $this->name );
                        return $status;
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                        return $status;
                }
@@ -214,7 +213,7 @@ class SwiftFileBackend extends FileBackend {
                } catch ( InvalidResponseException $e ) {
                        $status->fatal( 'backend-fail-connect', $this->name );
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                }
 
@@ -257,7 +256,7 @@ class SwiftFileBackend extends FileBackend {
                        $status->fatal( 'backend-fail-connect', $this->name );
                        return $status;
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                        return $status;
                }
@@ -276,7 +275,7 @@ class SwiftFileBackend extends FileBackend {
                        $status->fatal( 'backend-fail-connect', $this->name );
                        return $status;
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                        return $status;
                }
@@ -289,7 +288,7 @@ class SwiftFileBackend extends FileBackend {
                } catch ( InvalidResponseException $e ) {
                        $status->fatal( 'backend-fail-connect', $this->name );
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                }
 
@@ -325,7 +324,7 @@ class SwiftFileBackend extends FileBackend {
                        $status->fatal( 'backend-fail-connect', $this->name );
                        return $status;
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                        return $status;
                }
@@ -340,7 +339,7 @@ class SwiftFileBackend extends FileBackend {
                } catch ( InvalidResponseException $e ) {
                        $status->fatal( 'backend-fail-connect', $this->name );
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                }
 
@@ -366,7 +365,7 @@ class SwiftFileBackend extends FileBackend {
                } catch ( InvalidResponseException $e ) {
                        $status->fatal( 'backend-fail-connect', $this->name );
                } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal' );
+                       $status->fatal( 'backend-fail-internal', $this->name );
                        $this->logException( $e, __METHOD__, $params );
                }
 
index 60675f3..ce5b62c 100644 (file)
@@ -2256,7 +2256,7 @@ If the problem persists, contact an [[Special:ListUsers/sysop|administrator]].',
 'backend-fail-readonly'      => 'The backend "$1" is currently read-only. The reason given is: "$2"',
 'backend-fail-synced'        => 'The file "$1" is in an inconsistent state within the internal backends',
 'backend-fail-connect'       => 'Could not connect to file backend "$1".',
-'backend-fail-internal'      => 'An unknown internal file backend error occured.',
+'backend-fail-internal'      => 'An unknown error occurred in file backend "$1".',
 
 # Lock manager
 'lockmanager-notlocked'        => 'Could not unlock "$1"; it is not locked.',