summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53faf49)
raw | patch | inline | side by side (parent: 53faf49)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Jul 2010 13:30:05 +0000 (13:30 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Jul 2010 13:30:05 +0000 (13:30 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19041 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/posix/class_posixAccount.inc | patch | blob | history |
diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc
index 6c31a176496b9767189c3e5579554b9839c5ee8e..c717b0f142ff48ff0e95abd7bf9ce7a8780fc300 100644 (file)
}
}
- /* FIXME: NEED review of this section */
- /* Need to check shadowExpire separately */
-
- /*
- * If shadowExpire is not enabled in the template, it's a UNIX timestamp - so don't convert it to seconds.
- * The check is a hack - if difference between timestamp generated above and here is max 1 day.
- */
- if(abs($this->shadowExpire - time())>86400) {
- $this->shadowExpire= $this->convertToSeconds($this->shadowExpire);
- }
-
/* Only enable checkbox, if shadowExpire is in the future */
if($this->shadowExpire > time()) {
- $this->activate_shadowExpire= "1";
+ $this->activate_shadowExpire= "1";
}
+
+ /* Convert shadowExpire for usage */
+ if ($this->shadowExpire == 0){
+ $this->shadowExpire= "";
+ } else {
+ $this->shadowExpire= date('d.m.Y', $this->shadowExpire * 60 * 60 * 24);
+ }
+
}
function convertToSeconds($val)