diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-08 13:49:57 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-08 13:49:57 +0200 |
commit | a3436d4cbaa3ad059e64bd77cfe789beecacf87c (patch) | |
tree | 0bf270162d08dec1eb0fb33ce33a1392a930eb95 /inc | |
parent | 07ee09f49ad3a6ac567f123b338ccb75b1464164 (diff) | |
download | wallabag-a3436d4cbaa3ad059e64bd77cfe789beecacf87c.tar.gz wallabag-a3436d4cbaa3ad059e64bd77cfe789beecacf87c.tar.zst wallabag-a3436d4cbaa3ad059e64bd77cfe789beecacf87c.zip |
travis
Diffstat (limited to 'inc')
-rw-r--r-- | inc/poche/Poche.class.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index fecb1616..56910bc0 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -465,13 +465,15 @@ class Poche | |||
465 | } | 465 | } |
466 | 466 | ||
467 | /** | 467 | /** |
468 | * Check online the latest version of poche and cache it | 468 | * Checks online the latest version of poche and cache it |
469 | * @param string $which 'prod' or 'dev' | 469 | * @param string $which 'prod' or 'dev' |
470 | * @return string latest $which version | 470 | * @return string latest $which version |
471 | */ | 471 | */ |
472 | private function getPocheVersion($which = 'prod') | 472 | private function getPocheVersion($which = 'prod') |
473 | { | 473 | { |
474 | $cache_file = CACHE . '/' . $which; | 474 | $cache_file = CACHE . '/' . $which; |
475 | |||
476 | # checks if the cached version file exists | ||
475 | if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 86400 ))) { | 477 | if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 86400 ))) { |
476 | $version = file_get_contents($cache_file); | 478 | $version = file_get_contents($cache_file); |
477 | } else { | 479 | } else { |