aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Updater.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/Updater.php')
-rw-r--r--application/Updater.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/application/Updater.php b/application/Updater.php
index 72b2def0..8d2bd577 100644
--- a/application/Updater.php
+++ b/application/Updater.php
@@ -73,7 +73,7 @@ class Updater
73 } 73 }
74 74
75 if ($this->methods === null) { 75 if ($this->methods === null) {
76 throw new UpdaterException('Couldn\'t retrieve Updater class methods.'); 76 throw new UpdaterException(t('Couldn\'t retrieve Updater class methods.'));
77 } 77 }
78 78
79 foreach ($this->methods as $method) { 79 foreach ($this->methods as $method) {
@@ -436,6 +436,15 @@ class Updater
436 } 436 }
437 return true; 437 return true;
438 } 438 }
439
440 /**
441 * Save the datastore -> the link order is now applied when links are saved.
442 */
443 public function updateMethodReorderDatastore()
444 {
445 $this->linkDB->save($this->conf->get('resource.page_cache'));
446 return true;
447 }
439} 448}
440 449
441/** 450/**
@@ -482,7 +491,7 @@ class UpdaterException extends Exception
482 } 491 }
483 492
484 if (! empty($this->method)) { 493 if (! empty($this->method)) {
485 $out .= 'An error occurred while running the update '. $this->method . PHP_EOL; 494 $out .= t('An error occurred while running the update ') . $this->method . PHP_EOL;
486 } 495 }
487 496
488 if (! empty($this->previous)) { 497 if (! empty($this->previous)) {
@@ -522,11 +531,11 @@ function read_updates_file($updatesFilepath)
522function write_updates_file($updatesFilepath, $updates) 531function write_updates_file($updatesFilepath, $updates)
523{ 532{
524 if (empty($updatesFilepath)) { 533 if (empty($updatesFilepath)) {
525 throw new Exception('Updates file path is not set, can\'t write updates.'); 534 throw new Exception(t('Updates file path is not set, can\'t write updates.'));
526 } 535 }
527 536
528 $res = file_put_contents($updatesFilepath, implode(';', $updates)); 537 $res = file_put_contents($updatesFilepath, implode(';', $updates));
529 if ($res === false) { 538 if ($res === false) {
530 throw new Exception('Unable to write updates in '. $updatesFilepath . '.'); 539 throw new Exception(t('Unable to write updates in '. $updatesFilepath . '.'));
531 } 540 }
532} 541}