fixed errors in upload

This commit is contained in:
Roland Gruber 2010-11-20 19:57:32 +00:00
parent f54095f82e
commit 4722dc955e
3 changed files with 19 additions and 19 deletions

View File

@ -430,20 +430,18 @@ class asteriskVoicemail extends baseModule implements passwordService {
// add object class // add object class
if (!in_array("AsteriskVoiceMail", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "AsteriskVoiceMail"; if (!in_array("AsteriskVoiceMail", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "AsteriskVoiceMail";
if (!in_array('asteriskAccount', $selectedModules)) { //add context
//add context if ($rawAccounts[$i][$ids['asteriskAccount_AstContext']] == "") {
if ($rawAccounts[$i][$ids['asteriskAccount_AstContext']] == "") { // default value
// default value $partialAccounts[$i]['AstContext'] = 'default';
$partialAccounts[$i]['AstContext'] = 'default'; }
} elseif (get_preg($rawAccounts[$i][$ids['asteriskVoicemail_AstContext']], 'realname')) {
elseif (get_preg($rawAccounts[$i][$ids['asteriskVoicemail_AstContext']], 'realname')) { $partialAccounts[$i]['AstContext'] = $rawAccounts[$i][$ids['asteriskAccount_AstContext']];
$partialAccounts[$i]['AstContext'] = $rawAccounts[$i][$ids['asteriskAccount_AstContext']]; }
} else {
else { $errMsg = $this->messages['AstContext'][2];
$errMsg = $this->messages['AstContext'][2]; array_push($errMsg, array($i));
array_push($errMsg, array($i)); $messages[] = $errMsg;
$messages[] = $errMsg;
}
} }
// add account caller id // add account caller id

View File

@ -628,7 +628,9 @@ class kolabUser extends baseModule {
$messages = array(); $messages = array();
$delegates = searchLDAPByAttribute(null, null, 'inetOrgPerson', array('mail'), array('user')); $delegates = searchLDAPByAttribute(null, null, 'inetOrgPerson', array('mail'), array('user'));
for ($d = 0; $d < sizeof($delegates); $d++) { 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++) { for ($i = 0; $i < sizeof($rawAccounts); $i++) {
// add object class // add object class

View File

@ -202,7 +202,7 @@ class shadowAccount extends baseModule implements passwordService {
'example' => '14' 'example' => '14'
), ),
array( array(
'name' => 'shadowAccount_expiration', 'name' => 'shadowAccount_ignoreExpire',
'description' => _('Password expiration'), 'description' => _('Password expiration'),
'help' => 'shadowInactive', 'help' => 'shadowInactive',
'example' => '7' 'example' => '7'
@ -503,9 +503,9 @@ class shadowAccount extends baseModule implements passwordService {
$messages[] = $errMsg; $messages[] = $errMsg;
} }
// expiration date // expiration date
if ($rawAccounts[$i][$ids['shadowAccount_expireDay']] != '') { if ($rawAccounts[$i][$ids['shadowAccount_expireDate']] != '') {
if (get_preg($rawAccounts[$i][$ids['shadowAccount_expireDay']], 'date')) { if (get_preg($rawAccounts[$i][$ids['shadowAccount_expireDate']], 'date')) {
$parts = explode('-', $rawAccounts[$i][$ids['shadowAccount_expireDay']]); $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); $partialAccounts[$i]['shadowExpire'][] = intval(mktime(0, 0, 0, intval($parts[1]), intval($parts[0]), intval($parts[2]))/3600/24);
} }
else { else {