fixed errors in upload
This commit is contained in:
parent
f54095f82e
commit
4722dc955e
|
@ -430,20 +430,18 @@ class asteriskVoicemail extends baseModule implements passwordService {
|
|||
// add object class
|
||||
if (!in_array("AsteriskVoiceMail", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "AsteriskVoiceMail";
|
||||
|
||||
if (!in_array('asteriskAccount', $selectedModules)) {
|
||||
//add context
|
||||
if ($rawAccounts[$i][$ids['asteriskAccount_AstContext']] == "") {
|
||||
// default value
|
||||
$partialAccounts[$i]['AstContext'] = 'default';
|
||||
}
|
||||
elseif (get_preg($rawAccounts[$i][$ids['asteriskVoicemail_AstContext']], 'realname')) {
|
||||
$partialAccounts[$i]['AstContext'] = $rawAccounts[$i][$ids['asteriskAccount_AstContext']];
|
||||
}
|
||||
else {
|
||||
$errMsg = $this->messages['AstContext'][2];
|
||||
array_push($errMsg, array($i));
|
||||
$messages[] = $errMsg;
|
||||
}
|
||||
//add context
|
||||
if ($rawAccounts[$i][$ids['asteriskAccount_AstContext']] == "") {
|
||||
// default value
|
||||
$partialAccounts[$i]['AstContext'] = 'default';
|
||||
}
|
||||
elseif (get_preg($rawAccounts[$i][$ids['asteriskVoicemail_AstContext']], 'realname')) {
|
||||
$partialAccounts[$i]['AstContext'] = $rawAccounts[$i][$ids['asteriskAccount_AstContext']];
|
||||
}
|
||||
else {
|
||||
$errMsg = $this->messages['AstContext'][2];
|
||||
array_push($errMsg, array($i));
|
||||
$messages[] = $errMsg;
|
||||
}
|
||||
|
||||
// add account caller id
|
||||
|
|
|
@ -628,7 +628,9 @@ class kolabUser extends baseModule {
|
|||
$messages = array();
|
||||
$delegates = searchLDAPByAttribute(null, null, 'inetOrgPerson', array('mail'), array('user'));
|
||||
for ($d = 0; $d < sizeof($delegates); $d++) {
|
||||
$delegates[$d] = $delegates[$d]['mail'][0];
|
||||
if (isset($delegates[$d]['mail'][0])) {
|
||||
$delegates[$d] = $delegates[$d]['mail'][0];
|
||||
}
|
||||
}
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -202,7 +202,7 @@ class shadowAccount extends baseModule implements passwordService {
|
|||
'example' => '14'
|
||||
),
|
||||
array(
|
||||
'name' => 'shadowAccount_expiration',
|
||||
'name' => 'shadowAccount_ignoreExpire',
|
||||
'description' => _('Password expiration'),
|
||||
'help' => 'shadowInactive',
|
||||
'example' => '7'
|
||||
|
@ -503,9 +503,9 @@ class shadowAccount extends baseModule implements passwordService {
|
|||
$messages[] = $errMsg;
|
||||
}
|
||||
// expiration date
|
||||
if ($rawAccounts[$i][$ids['shadowAccount_expireDay']] != '') {
|
||||
if (get_preg($rawAccounts[$i][$ids['shadowAccount_expireDay']], 'date')) {
|
||||
$parts = explode('-', $rawAccounts[$i][$ids['shadowAccount_expireDay']]);
|
||||
if ($rawAccounts[$i][$ids['shadowAccount_expireDate']] != '') {
|
||||
if (get_preg($rawAccounts[$i][$ids['shadowAccount_expireDate']], 'date')) {
|
||||
$parts = explode('-', $rawAccounts[$i][$ids['shadowAccount_expireDate']]);
|
||||
$partialAccounts[$i]['shadowExpire'][] = intval(mktime(0, 0, 0, intval($parts[1]), intval($parts[0]), intval($parts[2]))/3600/24);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue