From 86da156d311517ea8e3f454593d80cf1af0347a4 Mon Sep 17 00:00:00 2001 From: filip Date: Mon, 1 Dec 2014 07:29:34 +0100 Subject: safer regenerating l10n numbers from license file --- en/about/license/license.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'en') diff --git a/en/about/license/license.php b/en/about/license/license.php index aa7c057bd..485199926 100644 --- a/en/about/license/license.php +++ b/en/about/license/license.php @@ -79,7 +79,11 @@ function load_license_numbers($lang, $skip_rebuilding_cache = false) if(!$po_time) { $po_time = 0; } // fallback } if(file_exists($cache_file)) { + $cached_time = -1; + $po_time = 0; include $cache_file; + $cached_time = intval($cached_time); + $po_time = intval($po_time); if($cached_time < $po_time) { $rebuild_cache = true; } @@ -87,6 +91,7 @@ function load_license_numbers($lang, $skip_rebuilding_cache = false) $rebuild_cache = true; } if($rebuild_cache) { + $po_time = intval($po_time); $license_array = read_license_from_vcs($lang); $license_numbers = array_pop($license_array); $license_num_all = $license_numbers["all"]; -- cgit v1.2.1