some upload fixes

This commit is contained in:
Roland Gruber 2004-11-28 15:56:59 +00:00
parent 110277ad51
commit c97223eb05
1 changed files with 15 additions and 11 deletions

View File

@ -45,8 +45,10 @@ class sambaAccount extends baseModule {
// error messages for input checks // error messages for input checks
$this->messages['homePath'][0] = array('ERROR', _('Home path'), _('Home path is invalid.')); $this->messages['homePath'][0] = array('ERROR', _('Home path'), _('Home path is invalid.'));
$this->messages['homePath'][1] = array('INFO', _('Home path'), _('Inserted user- or groupname in HomePath.')); $this->messages['homePath'][1] = array('INFO', _('Home path'), _('Inserted user- or groupname in HomePath.'));
$this->messages['homePath'][2] = array('INFO', _('Account %s:') . ' sambaAccount_homePath', _('Inserted user- or groupname in HomePath.'));
$this->messages['profilePath'][0] = array('ERROR', _('Profile path'), _('Profile path is invalid!')); $this->messages['profilePath'][0] = array('ERROR', _('Profile path'), _('Profile path is invalid!'));
$this->messages['profilePath'][1] = array('INFO', _('Profile path'), _('Inserted user- or groupname in profilepath.')); $this->messages['profilePath'][1] = array('INFO', _('Profile path'), _('Inserted user- or groupname in profilepath.'));
$this->messages['profilePath'][2] = array('INFO', _('Account %s:') . ' sambaAccount_profilePath', _('Inserted user- or groupname in profilepath.'));
$this->messages['logonScript'][0] = array('ERROR', _('Logon script'), _('Logon script is invalid!')); $this->messages['logonScript'][0] = array('ERROR', _('Logon script'), _('Logon script is invalid!'));
$this->messages['logonScript'][1] = array('INFO', _('Logon script'), _('Inserted user- or groupname in logon script.')); $this->messages['logonScript'][1] = array('INFO', _('Logon script'), _('Inserted user- or groupname in logon script.'));
$this->messages['logonScript'][2] = array('ERROR', _('Account %s:') . ' sambaAccount_logonScript', _('Logon script is invalid!')); $this->messages['logonScript'][2] = array('ERROR', _('Account %s:') . ' sambaAccount_logonScript', _('Logon script is invalid!'));
@ -252,13 +254,13 @@ class sambaAccount extends baseModule {
'name' => 'sambaAccount_homePath', 'name' => 'sambaAccount_homePath',
'description' => _('Home path'), 'description' => _('Home path'),
'help' => 'homePath', 'help' => 'homePath',
'example' => '/home/smiller' 'example' => _('\\\\server\\homes\\smiller')
), ),
array( array(
'name' => 'sambaAccount_profilePath', 'name' => 'sambaAccount_profilePath',
'description' => _('Profile path'), 'description' => _('Profile path'),
'help' => 'profilePath', 'help' => 'profilePath',
'example' => '\\server\profiles\smiller' 'example' => _('\\\\server\\profiles\\smiller')
), ),
array( array(
'name' => 'sambaAccount_logonScript', 'name' => 'sambaAccount_logonScript',
@ -862,13 +864,15 @@ class sambaAccount extends baseModule {
for ($i = 0; $i < sizeof($rawAccounts); $i++) { for ($i = 0; $i < sizeof($rawAccounts); $i++) {
if (!in_array("sambaAccount", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "sambaAccount"; if (!in_array("sambaAccount", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "sambaAccount";
// displayName // displayName
if (get_preg($rawAccounts[$i][$ids['sambaAccount_displayName']], 'realname')) { if ($rawAccounts[$i][$ids['sambaAccount_displayName']] != "") {
$partialAccounts[$i]['displayName'] = $rawAccounts[$i][$ids['sambaAccount_displayName']]; if (get_preg($rawAccounts[$i][$ids['sambaAccount_displayName']], 'realname')) {
} $partialAccounts[$i]['displayName'] = $rawAccounts[$i][$ids['sambaAccount_displayName']];
else { }
$errMsg = $this->messages['displayName'][0]; else {
array_push($errMsg, array($i)); $errMsg = $this->messages['displayName'][0];
$triggered_messages[] = $errMsg; array_push($errMsg, array($i));
$triggered_messages[] = $errMsg;
}
} }
// password // password
if (!get_preg($rawAccounts[$i][$ids['sambaAccount_password']], 'password')) { if (!get_preg($rawAccounts[$i][$ids['sambaAccount_password']], 'password')) {
@ -992,7 +996,7 @@ class sambaAccount extends baseModule {
$partialAccounts[$i]['smbHome'] = $rawAccounts[$i][$ids['sambaAccount_homePath']]; $partialAccounts[$i]['smbHome'] = $rawAccounts[$i][$ids['sambaAccount_homePath']];
} }
else { else {
$errMsg = $this->messages['homePath'][0]; $errMsg = $this->messages['homePath'][2];
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }
@ -1003,7 +1007,7 @@ class sambaAccount extends baseModule {
$partialAccounts[$i]['profilePath'] = $rawAccounts[$i][$ids['sambaAccount_profilePath']]; $partialAccounts[$i]['profilePath'] = $rawAccounts[$i][$ids['sambaAccount_profilePath']];
} }
else { else {
$errMsg = $this->messages['profilePath'][0]; $errMsg = $this->messages['profilePath'][2];
array_push($errMsg, array($i)); array_push($errMsg, array($i));
$triggered_messages[] = $errMsg; $triggered_messages[] = $errMsg;
} }