mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 04:41:59 +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) {
|
function fixup_date_condition($field = '', $date1 = 0, $date2 = 0) {
|
||||||
|
global $session;
|
||||||
|
|
||||||
$date = "";
|
$date = "";
|
||||||
|
|
||||||
// Check if you want to apply a 'not before' value to a non-auditor user
|
// Check if we want to apply a mandatory date1 (=not before) restriction
|
||||||
if(Registry::get('auditor') == 0 && Registry::get('not_before_date')) {
|
// to a non-auditor user
|
||||||
$date1 = Registry::get('not_before_date');
|
if(Registry::get('auditor') == 0 && $session->get('not_before_date')) {
|
||||||
|
$date1 = $session->get('not_before_date');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($date1) {
|
if($date1) {
|
||||||
list($y,$m,$d) = preg_split("/(\.|\-|\/)/", $date1);
|
list($y,$m,$d) = preg_split("/(\.|\-|\/)/", $date1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user