diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 32 |
1 files changed, 19 insertions, 13 deletions
@@ -92,7 +92,8 @@ $GLOBALS['config']['ENABLE_THUMBNAILS'] = true; | |||
92 | $GLOBALS['config']['ENABLE_LOCALCACHE'] = true; | 92 | $GLOBALS['config']['ENABLE_LOCALCACHE'] = true; |
93 | 93 | ||
94 | // Update check frequency for Shaarli. 86400 seconds=24 hours | 94 | // Update check frequency for Shaarli. 86400 seconds=24 hours |
95 | $GLOBALS['config']['UPDATECHECK_INTERVAL'] = 86400 ; | 95 | $GLOBALS['config']['UPDATECHECK_BRANCH'] = 'stable'; |
96 | $GLOBALS['config']['UPDATECHECK_INTERVAL'] = 86400; | ||
96 | 97 | ||
97 | 98 | ||
98 | /* | 99 | /* |
@@ -631,18 +632,23 @@ class pageBuilder | |||
631 | private function initialize() | 632 | private function initialize() |
632 | { | 633 | { |
633 | $this->tpl = new RainTPL; | 634 | $this->tpl = new RainTPL; |
634 | $this->tpl->assign( | 635 | |
635 | 'newversion', | 636 | try { |
636 | escape( | 637 | $version = ApplicationUtils::checkUpdate( |
637 | ApplicationUtils::checkUpdate( | 638 | shaarli_version, |
638 | shaarli_version, | 639 | $GLOBALS['config']['UPDATECHECK_FILENAME'], |
639 | $GLOBALS['config']['UPDATECHECK_FILENAME'], | 640 | $GLOBALS['config']['UPDATECHECK_INTERVAL'], |
640 | $GLOBALS['config']['UPDATECHECK_INTERVAL'], | 641 | $GLOBALS['config']['ENABLE_UPDATECHECK'], |
641 | $GLOBALS['config']['ENABLE_UPDATECHECK'], | 642 | isLoggedIn(), |
642 | isLoggedIn() | 643 | $GLOBALS['config']['UPDATECHECK_BRANCH'] |
643 | ) | 644 | ); |
644 | ) | 645 | $this->tpl->assign('newVersion', escape($version)); |
645 | ); | 646 | |
647 | } catch (Exception $exc) { | ||
648 | logm($exc->getMessage()); | ||
649 | $this->tpl->assign('versionError', escape($exc->getMessage())); | ||
650 | } | ||
651 | |||
646 | $this->tpl->assign('feedurl', escape(index_url($_SERVER))); | 652 | $this->tpl->assign('feedurl', escape(index_url($_SERVER))); |
647 | $searchcrits = ''; // Search criteria | 653 | $searchcrits = ''; // Search criteria |
648 | if (!empty($_GET['searchtags'])) { | 654 | if (!empty($_GET['searchtags'])) { |