fixed mktime calls
This commit is contained in:
parent
5c96801e81
commit
54dadb3c76
|
@ -1232,7 +1232,7 @@ class sambaSamAccount extends baseModule {
|
||||||
}
|
}
|
||||||
// expiration date
|
// expiration date
|
||||||
if (isset($profile['sambaSamAccount_expire_day'][0]) && ($profile['sambaSamAccount_expire_day'][0] != "")) {
|
if (isset($profile['sambaSamAccount_expire_day'][0]) && ($profile['sambaSamAccount_expire_day'][0] != "")) {
|
||||||
$date = mktime(10, 0, 0, intval($profile['sambaSamAccount_expire_mon'][0]),
|
$date = mktime(0, 0, 0, intval($profile['sambaSamAccount_expire_mon'][0]),
|
||||||
intval($profile['sambaSamAccount_expire_day'][0]), intval($profile['sambaSamAccount_expire_yea'][0]));
|
intval($profile['sambaSamAccount_expire_day'][0]), intval($profile['sambaSamAccount_expire_yea'][0]));
|
||||||
$this->attributes['sambaKickoffTime'][0] = $date;
|
$this->attributes['sambaKickoffTime'][0] = $date;
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ class shadowAccount extends baseModule {
|
||||||
$this->attributes['shadowMax'][0] = $post['shadowMax'];
|
$this->attributes['shadowMax'][0] = $post['shadowMax'];
|
||||||
$this->attributes['shadowWarning'][0] = $post['shadowWarning'];
|
$this->attributes['shadowWarning'][0] = $post['shadowWarning'];
|
||||||
$this->attributes['shadowInactive'][0] = $post['shadowInactive'];
|
$this->attributes['shadowInactive'][0] = $post['shadowInactive'];
|
||||||
$this->attributes['shadowExpire'][0] = intval(mktime(10, 0, 0, intval($post['shadowExpire_mon']), intval($post['shadowExpire_day']),
|
$this->attributes['shadowExpire'][0] = intval(mktime(0, 0, 0, intval($post['shadowExpire_mon']), intval($post['shadowExpire_day']),
|
||||||
intval($post['shadowExpire_yea']))/3600/24);
|
intval($post['shadowExpire_yea']))/3600/24);
|
||||||
if ( !get_preg($this->attributes['shadowMin'][0], 'digit')) $errors['shadowMin'][] = $this->messages['shadowMin'][0];
|
if ( !get_preg($this->attributes['shadowMin'][0], 'digit')) $errors['shadowMin'][] = $this->messages['shadowMin'][0];
|
||||||
if ( !get_preg($this->attributes['shadowMax'][0], 'digit')) $errors['shadowMax'][] = $this->messages['shadowMax'][0];
|
if ( !get_preg($this->attributes['shadowMax'][0], 'digit')) $errors['shadowMax'][] = $this->messages['shadowMax'][0];
|
||||||
|
@ -395,7 +395,7 @@ class shadowAccount extends baseModule {
|
||||||
if ($rawAccounts[$i][$ids['shadowAccount_expireDay']] != '') {
|
if ($rawAccounts[$i][$ids['shadowAccount_expireDay']] != '') {
|
||||||
if (get_preg($rawAccounts[$i][$ids['shadowAccount_expireDay']], 'date')) {
|
if (get_preg($rawAccounts[$i][$ids['shadowAccount_expireDay']], 'date')) {
|
||||||
$parts = explode('-', $rawAccounts[$i][$ids['shadowAccount_expireDay']]);
|
$parts = explode('-', $rawAccounts[$i][$ids['shadowAccount_expireDay']]);
|
||||||
$partialAccounts[$i]['shadowExpire'][] = intval(mktime(10, 0, 0, intval($parts[1]), intval($parts[0]), intval($parts[2]))/3600/24);
|
$partialAccounts[$i]['shadowExpire'][] = intval(mktime(0, 0, 0, intval($parts[1]), intval($parts[0]), intval($parts[2]))/3600/24);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$errMsg = $this->messages['shadow_expireDate'][0];
|
$errMsg = $this->messages['shadow_expireDate'][0];
|
||||||
|
@ -418,7 +418,7 @@ class shadowAccount extends baseModule {
|
||||||
// special profile options
|
// special profile options
|
||||||
// expiration date
|
// expiration date
|
||||||
if (isset($profile['shadowAccount_shadowExpire_day'][0]) && ($profile['shadowAccount_shadowExpire_day'][0] != "")) {
|
if (isset($profile['shadowAccount_shadowExpire_day'][0]) && ($profile['shadowAccount_shadowExpire_day'][0] != "")) {
|
||||||
$date = intval(mktime(10, 0, 0, intval($profile['shadowAccount_shadowExpire_mon'][0]),
|
$date = intval(mktime(0, 0, 0, intval($profile['shadowAccount_shadowExpire_mon'][0]),
|
||||||
intval($profile['shadowAccount_shadowExpire_day'][0]), intval($profile['shadowAccount_shadowExpire_yea'][0]))/3600/24);
|
intval($profile['shadowAccount_shadowExpire_day'][0]), intval($profile['shadowAccount_shadowExpire_yea'][0]))/3600/24);
|
||||||
$this->attributes['shadowExpire'][0] = $date;
|
$this->attributes['shadowExpire'][0] = $date;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue