summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 490069c)
raw | patch | inline | side by side (parent: 490069c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Jul 2010 13:28:57 +0000 (13:28 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Jul 2010 13:28:57 +0000 (13:28 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19040 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 5222ff3377382561fe842c33f4d378f9169f8d99..6df03a5641c877d41a0b9c3db4e7fe25a0ef8485 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";
}
+
+ /* 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)