1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00
This commit is contained in:
Nicolas Lœuillet 2013-08-08 13:49:57 +02:00
parent 07ee09f49a
commit a3436d4cba
3 changed files with 20 additions and 2 deletions

View file

@ -465,13 +465,15 @@ class Poche
}
/**
* Check online the latest version of poche and cache it
* Checks online the latest version of poche and cache it
* @param string $which 'prod' or 'dev'
* @return string latest $which version
*/
private function getPocheVersion($which = 'prod')
{
$cache_file = CACHE . '/' . $which;
# checks if the cached version file exists
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 86400 ))) {
$version = file_get_contents($cache_file);
} else {