mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Added the function "db_search_in_history_db"
This commit is contained in:
parent
676d3cb6c5
commit
54d5f9047b
@ -1187,4 +1187,25 @@ function db_get_fields($table) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int Unix timestamp with the date.
|
||||||
|
*
|
||||||
|
* @return bool Returns true if the history db has data after the date provided or false otherwise.
|
||||||
|
*/
|
||||||
|
function db_search_in_history_db ($utimestamp) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$search_in_history_db = false;
|
||||||
|
if ($config['history_db_enabled'] == 1) {
|
||||||
|
$history_db_start_period = $config['history_db_days'] * SECONDS_1DAY;
|
||||||
|
|
||||||
|
// If the date is newer than the newest history db data
|
||||||
|
if (time() - $history_db_start_period >= $utimestamp)
|
||||||
|
$search_in_history_db = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $search_in_history_db;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user