diff options
Diffstat (limited to 'application/Updater.php')
-rw-r--r-- | application/Updater.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/application/Updater.php b/application/Updater.php index 27cb2f0a..fd7e2073 100644 --- a/application/Updater.php +++ b/application/Updater.php | |||
@@ -1,6 +1,7 @@ | |||
1 | <?php | 1 | <?php |
2 | use Shaarli\Config\ConfigJson; | 2 | use Shaarli\Config\ConfigJson; |
3 | use Shaarli\Config\ConfigPhp; | 3 | use Shaarli\Config\ConfigPhp; |
4 | use Shaarli\Config\ConfigManager; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * Class Updater. | 7 | * Class Updater. |
@@ -363,6 +364,22 @@ class Updater | |||
363 | 364 | ||
364 | return true; | 365 | return true; |
365 | } | 366 | } |
367 | |||
368 | /** | ||
369 | * Add 'http://' to Piwik URL the setting is set. | ||
370 | * | ||
371 | * @return bool true if the update is successful, false otherwise. | ||
372 | */ | ||
373 | public function updateMethodPiwikUrl() | ||
374 | { | ||
375 | if (! $this->conf->exists('plugins.PIWIK_URL') || startsWith($this->conf->get('plugins.PIWIK_URL'), 'http')) { | ||
376 | return true; | ||
377 | } | ||
378 | |||
379 | $this->conf->set('plugins.PIWIK_URL', 'http://'. $this->conf->get('plugins.PIWIK_URL')); | ||
380 | $this->conf->write($this->isLoggedIn); | ||
381 | return true; | ||
382 | } | ||
366 | } | 383 | } |
367 | 384 | ||
368 | /** | 385 | /** |