This commit is contained in:
@@ -200,7 +200,7 @@ class pts_config
|
||||
$read_value = str_replace('~/.phoronix-test-suite/', PTS_USER_PATH, $read_value);
|
||||
}
|
||||
|
||||
return !empty($read_value) ? $read_value : $predefined_value;
|
||||
return (!empty($read_value) || is_numeric($read_value)) ? $read_value : $predefined_value;
|
||||
}
|
||||
public static function read_bool_config($xml_pointer, $predefined_value = false, &$nye_xml = null)
|
||||
{
|
||||
|
||||
@@ -378,15 +378,15 @@ class pts_openbenchmarking
|
||||
$index_cache_ttl = defined('OPENBENCHMARKING_BUILD') ? (1 / 24) : 1;
|
||||
if(PTS_IS_CLIENT && ($config_ttl = pts_config::read_user_config('PhoronixTestSuite/Options/OpenBenchmarking/IndexCacheTTL')))
|
||||
{
|
||||
if($config_ttl === 0)
|
||||
{
|
||||
// if the value is 0, only rely upon manual refreshes
|
||||
continue;
|
||||
}
|
||||
else if(is_numeric($config_ttl) && $config_ttl >= 1)
|
||||
if(is_numeric($config_ttl) && $config_ttl >= 1)
|
||||
{
|
||||
$index_cache_ttl = $config_ttl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if the value is 0 or garbage, only rely upon manual refreshes
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if($generated_time > (time() - (86400 * $index_cache_ttl)) && (!defined('FIRST_RUN_ON_PTS_UPGRADE') || FIRST_RUN_ON_PTS_UPGRADE == false))
|
||||
|
||||
Reference in New Issue
Block a user