Explorar o código

Use cached JSON countries file

Alan Lam %!s(int64=8) %!d(string=hai) anos
pai
achega
ae3b44b997
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      engine/form.php

+ 1 - 1
engine/form.php

@@ -108,7 +108,7 @@ class Form {
 		$file = ROOT_DIR . "/files/countries.json";
 		$file = ROOT_DIR . "/files/countries.json";
 		$threshold = time() - (7 * 86400);
 		$threshold = time() - (7 * 86400);
 
 
-		if(false && file_exists($file) && filemtime($file) > $threshold) {
+		if(file_exists($file) && filemtime($file) > $threshold) {
 			$countries_json = @file_get_contents($file);
 			$countries_json = @file_get_contents($file);
 			$countries = json_decode($countries_json);
 			$countries = json_decode($countries_json);
 		}
 		}