aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-08 13:49:57 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-08 13:49:57 +0200
commita3436d4cbaa3ad059e64bd77cfe789beecacf87c (patch)
tree0bf270162d08dec1eb0fb33ce33a1392a930eb95 /inc/poche
parent07ee09f49ad3a6ac567f123b338ccb75b1464164 (diff)
downloadwallabag-a3436d4cbaa3ad059e64bd77cfe789beecacf87c.tar.gz
wallabag-a3436d4cbaa3ad059e64bd77cfe789beecacf87c.tar.zst
wallabag-a3436d4cbaa3ad059e64bd77cfe789beecacf87c.zip
travis
Diffstat (limited to 'inc/poche')
-rw-r--r--inc/poche/Poche.class.php4
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 {