Index: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php |
— | — | @@ -256,12 +256,12 @@ |
257 | 257 | $changedStrings = array_diff_assoc( $base_messages, $compare_messages ); |
258 | 258 | |
259 | 259 | // If we want to save the differences |
260 | | - if ( $saveResults === true && !empty($changedStrings)) { |
| 260 | + if ( $saveResults === true && !empty($changedStrings) && is_array($changeStrings)) { |
261 | 261 | self::myLog( "--Checking languagecode {$langcode}--" ); |
262 | 262 | // The save them |
263 | 263 | $updates = self::saveChanges( $changedStrings, $forbiddenKeys, $base_messages, $langcode ); |
264 | 264 | self::myLog( "{$updates} messages updated for {$langcode}." ); |
265 | | - } elseif($saveResult === true) { |
| 265 | + } elseif($saveResults === true) { |
266 | 266 | self::myLog( "--{$langcode} hasn't changed--" ); |
267 | 267 | } |
268 | 268 | |
— | — | @@ -442,12 +442,15 @@ |
443 | 443 | $changedStrings = array_diff_assoc( $messages, $compare_messages[$language] ); |
444 | 444 | |
445 | 445 | // If we want to save the changes |
446 | | - if ( $saveResults ) { |
447 | | - self::myLog( "--Checking languagecode {$language} for extension {$extension}--" ); |
448 | | - // Do really save the changes |
449 | | - $updates += self::saveChanges( $changedStrings, $forbiddenKeys, $messages, $language ); |
| 446 | + if ( $saveResults === true && !empty($changedStrings) && is_array($changeStrings)) { |
| 447 | + self::myLog( "--Checking languagecode {$langcode}--" ); |
| 448 | + // The save them |
| 449 | + $updates = self::saveChanges( $changedStrings, $forbiddenKeys, $base_messages, $langcode ); |
| 450 | + self::myLog( "{$updates} messages updated for {$langcode}." ); |
| 451 | + } elseif($saveResults === true) { |
| 452 | + self::myLog( "--{$langcode} hasn't changed--" ); |
450 | 453 | } |
451 | | - } |
| 454 | + } |
452 | 455 | |
453 | 456 | // And log some stuff |
454 | 457 | self::myLog( "Updated " . $updates . " messages for the '{$extension}' extension" ); |