mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:30:12 +01:00
gui: use a session variable for "not before" feature
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
b7b61a80e5
commit
e3f53863b7
@ -423,13 +423,17 @@ function fetch_url($url = '') {
|
||||
|
||||
|
||||
function fixup_date_condition($field = '', $date1 = 0, $date2 = 0) {
|
||||
global $session;
|
||||
|
||||
$date = "";
|
||||
|
||||
// Check if you want to apply a 'not before' value to a non-auditor user
|
||||
if(Registry::get('auditor') == 0 && Registry::get('not_before_date')) {
|
||||
$date1 = Registry::get('not_before_date');
|
||||
// Check if we want to apply a mandatory date1 (=not before) restriction
|
||||
// to a non-auditor user
|
||||
if(Registry::get('auditor') == 0 && $session->get('not_before_date')) {
|
||||
$date1 = $session->get('not_before_date');
|
||||
}
|
||||
|
||||
|
||||
if($date1) {
|
||||
list($y,$m,$d) = preg_split("/(\.|\-|\/)/", $date1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user