r108750 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108749‎ | r108750 | r108751 >
Date:20:05, 12 January 2012
Author:aaron
Status:ok
Tags:
Comment:
* Added backend name to 'backend-fail-internal' message
* Removed TODO comment in SwiftFileBackend
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php
@@ -11,11 +11,10 @@
1212 * Status messages should avoid mentioning the Swift account name
1313 * Likewise, error suppression should be used to avoid path disclosure.
1414 *
15 - * This requires the php-cloudfiles library is present,
 15+ * This requires that the php-cloudfiles library is present,
1616 * which is available at https://github.com/rackspace/php-cloudfiles.
1717 * All of the library classes must be registed in $wgAutoloadClasses.
1818 *
19 - * @TODO: update MessagesEn for status errors.
2019 * @TODO: handle 'latest' param as "X-Newest: true".
2120 *
2221 * @ingroup FileBackend
@@ -95,7 +94,7 @@
9695 $status->fatal( 'backend-fail-connect', $this->name );
9796 return $status;
9897 } catch ( Exception $e ) { // some other exception?
99 - $status->fatal( 'backend-fail-internal' );
 98+ $status->fatal( 'backend-fail-internal', $this->name );
10099 $this->logException( $e, __METHOD__, $params );
101100 return $status;
102101 }
@@ -114,7 +113,7 @@
115114 $status->fatal( 'backend-fail-connect', $this->name );
116115 return $status;
117116 } catch ( Exception $e ) { // some other exception?
118 - $status->fatal( 'backend-fail-internal' );
 117+ $status->fatal( 'backend-fail-internal', $this->name );
119118 $this->logException( $e, __METHOD__, $params );
120119 return $status;
121120 }
@@ -133,7 +132,7 @@
134133 } catch ( InvalidResponseException $e ) {
135134 $status->fatal( 'backend-fail-connect', $this->name );
136135 } catch ( Exception $e ) { // some other exception?
137 - $status->fatal( 'backend-fail-internal' );
 136+ $status->fatal( 'backend-fail-internal', $this->name );
138137 $this->logException( $e, __METHOD__, $params );
139138 }
140139
@@ -169,7 +168,7 @@
170169 $status->fatal( 'backend-fail-connect', $this->name );
171170 return $status;
172171 } catch ( Exception $e ) { // some other exception?
173 - $status->fatal( 'backend-fail-internal' );
 172+ $status->fatal( 'backend-fail-internal', $this->name );
174173 $this->logException( $e, __METHOD__, $params );
175174 return $status;
176175 }
@@ -188,7 +187,7 @@
189188 $status->fatal( 'backend-fail-connect', $this->name );
190189 return $status;
191190 } catch ( Exception $e ) { // some other exception?
192 - $status->fatal( 'backend-fail-internal' );
 191+ $status->fatal( 'backend-fail-internal', $this->name );
193192 $this->logException( $e, __METHOD__, $params );
194193 return $status;
195194 }
@@ -214,7 +213,7 @@
215214 } catch ( InvalidResponseException $e ) {
216215 $status->fatal( 'backend-fail-connect', $this->name );
217216 } catch ( Exception $e ) { // some other exception?
218 - $status->fatal( 'backend-fail-internal' );
 217+ $status->fatal( 'backend-fail-internal', $this->name );
219218 $this->logException( $e, __METHOD__, $params );
220219 }
221220
@@ -257,7 +256,7 @@
258257 $status->fatal( 'backend-fail-connect', $this->name );
259258 return $status;
260259 } catch ( Exception $e ) { // some other exception?
261 - $status->fatal( 'backend-fail-internal' );
 260+ $status->fatal( 'backend-fail-internal', $this->name );
262261 $this->logException( $e, __METHOD__, $params );
263262 return $status;
264263 }
@@ -276,7 +275,7 @@
277276 $status->fatal( 'backend-fail-connect', $this->name );
278277 return $status;
279278 } catch ( Exception $e ) { // some other exception?
280 - $status->fatal( 'backend-fail-internal' );
 279+ $status->fatal( 'backend-fail-internal', $this->name );
281280 $this->logException( $e, __METHOD__, $params );
282281 return $status;
283282 }
@@ -289,7 +288,7 @@
290289 } catch ( InvalidResponseException $e ) {
291290 $status->fatal( 'backend-fail-connect', $this->name );
292291 } catch ( Exception $e ) { // some other exception?
293 - $status->fatal( 'backend-fail-internal' );
 292+ $status->fatal( 'backend-fail-internal', $this->name );
294293 $this->logException( $e, __METHOD__, $params );
295294 }
296295
@@ -325,7 +324,7 @@
326325 $status->fatal( 'backend-fail-connect', $this->name );
327326 return $status;
328327 } catch ( Exception $e ) { // some other exception?
329 - $status->fatal( 'backend-fail-internal' );
 328+ $status->fatal( 'backend-fail-internal', $this->name );
330329 $this->logException( $e, __METHOD__, $params );
331330 return $status;
332331 }
@@ -340,7 +339,7 @@
341340 } catch ( InvalidResponseException $e ) {
342341 $status->fatal( 'backend-fail-connect', $this->name );
343342 } catch ( Exception $e ) { // some other exception?
344 - $status->fatal( 'backend-fail-internal' );
 343+ $status->fatal( 'backend-fail-internal', $this->name );
345344 $this->logException( $e, __METHOD__, $params );
346345 }
347346
@@ -366,7 +365,7 @@
367366 } catch ( InvalidResponseException $e ) {
368367 $status->fatal( 'backend-fail-connect', $this->name );
369368 } catch ( Exception $e ) { // some other exception?
370 - $status->fatal( 'backend-fail-internal' );
 369+ $status->fatal( 'backend-fail-internal', $this->name );
371370 $this->logException( $e, __METHOD__, $params );
372371 }
373372
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2256,7 +2256,7 @@
22572257 'backend-fail-readonly' => 'The backend "$1" is currently read-only. The reason given is: "$2"',
22582258 'backend-fail-synced' => 'The file "$1" is in an inconsistent state within the internal backends',
22592259 'backend-fail-connect' => 'Could not connect to file backend "$1".',
2260 -'backend-fail-internal' => 'An unknown internal file backend error occured.',
 2260+'backend-fail-internal' => 'An unknown error occurred in file backend "$1".',
22612261
22622262 # Lock manager
22632263 'lockmanager-notlocked' => 'Could not unlock "$1"; it is not locked.',

Status & tagging log