From 6a09fe4b754670dd907b953cb46fdc44ff143503 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 12 Jan 2012 20:05:25 +0000 Subject: [PATCH] * Added backend name to 'backend-fail-internal' message * Removed TODO comment in SwiftFileBackend --- .../filerepo/backend/SwiftFileBackend.php | 27 +++++++++---------- languages/messages/MessagesEn.php | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/includes/filerepo/backend/SwiftFileBackend.php b/includes/filerepo/backend/SwiftFileBackend.php index 88381857ca..e9bbb4ecc7 100644 --- a/includes/filerepo/backend/SwiftFileBackend.php +++ b/includes/filerepo/backend/SwiftFileBackend.php @@ -11,11 +11,10 @@ * 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 ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 60675f374d..ce5b62cd76 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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.', -- 2.20.1