fixed getdate() warnings

This commit is contained in:
Roland Gruber 2006-02-11 13:19:27 +00:00
parent 7fbbff42c3
commit 3c0a8ab72b
2 changed files with 10 additions and 5 deletions

View File

@ -695,8 +695,10 @@ class sambaAccount extends baseModule {
2 => array('kind' => 'help', 'value' => 'displayName'));
// user attributes
if ($_SESSION[$this->base]->type=='user') {
$canchangedate = getdate($this->attributes['pwdCanChange'][0]);
$mustchangedate = getdate($this->attributes['pwdMustChange'][0]);
if (isset($this->attributes['pwdCanChange'][0])) $canchangedate = getdate(intval($this->attributes['pwdCanChange'][0]));
else $canchangedate = getdate(0);
if (isset($this->attributes['pwdMustChange'][0])) $mustchangedate = getdate(intval($this->attributes['pwdMustChange'][0]));
else $mustchangedate = getdate(0);
$return[] = array ( 0 => array ( 'kind' => 'input', 'name' => 'pwdCanChange_h', 'type' => 'hidden', 'value' => $canchangedate['hours']),
1 => array ( 'kind' => 'input', 'name' => 'pwdCanChange_m', 'type' => 'hidden', 'value' => $canchangedate['minutes']),
2 => array ( 'kind' => 'input', 'name' => 'pwdCanChange_s', 'type' => 'hidden', 'value' => $canchangedate['seconds']),

View File

@ -770,9 +770,12 @@ class sambaSamAccount extends baseModule {
}
}
}
$canchangedate = getdate($this->attributes['sambaPwdCanChange'][0]);
$mustchangedate = getdate($this->attributes['sambaPwdMustChange'][0]);
$expiredate = getdate($this->attributes['sambaKickoffTime'][0]);
if (isset($this->attributes['sambaPwdCanChange'][0])) $canchangedate = getdate(intval($this->attributes['sambaPwdCanChange'][0]));
else $canchangedate = getdate(0);
if (isset($this->attributes['sambaPwdMustChange'][0])) $mustchangedate = getdate(intval($this->attributes['sambaPwdMustChange'][0]));
else $mustchangedate = getdate(0);
if (isset($this->attributes['sambaKickoffTime'][0])) $expiredate = getdate(intval($this->attributes['sambaKickoffTime'][0]));
else $expiredate = getdate(0);
$return[] = array(
0 => array('kind' => 'text', 'text' => _('Display name')),