scriptpath -> scriptPath update

This commit is contained in:
Roland Gruber 2003-06-01 12:25:23 +00:00
parent 292b7addee
commit fc36ed2457
3 changed files with 11 additions and 11 deletions

View File

@ -159,8 +159,8 @@ function loadUserProfile($profile) {
$acc->smb_homedrive = chop(substr($line, 15, strlen($line)-15));
continue;
}
if (substr($line, 0, 16) == "smb_scriptpath: ") {
$acc->smb_scriptpath = chop(substr($line, 16, strlen($line)-16));
if (substr($line, 0, 16) == "smb_scriptPath: ") {
$acc->smb_scriptPath = chop(substr($line, 16, strlen($line)-16));
continue;
}
if (substr($line, 0, 17) == "smb_profilePath: ") {
@ -289,18 +289,18 @@ function saveUserProfile($account, $profile) {
// replace user and group names
$homedir = $account->general_homedir;
$profpath = $account->smb_profilePath;
$scriptpath = $account->smb_scriptpath;
$scriptPath = $account->smb_scriptPath;
$smbhome = $account->smb_smbhome;
if ($account->general_username) {
$homedir = str_replace($account->general_username, "\$user", $homedir);
$profpath = str_replace($account->general_username, "\$user", $profpath);
$scriptpath = str_replace($account->general_username, "\$user", $scriptpath);
$scriptPath = str_replace($account->general_username, "\$user", $scriptPath);
$smbhome = str_replace($account->general_username, "\$user", $smbhome);
}
if ($account->general_group) {
$homedir = str_replace($account->general_group, "\$group", $homedir);
$profpath = str_replace($account->general_group, "\$group", $profpath);
$scriptpath = str_replace($account->general_group, "\$group", $scriptpath);
$scriptPath = str_replace($account->general_group, "\$group", $scriptPath);
$smbhome = str_replace($account->general_group, "\$group", $smbhome);
}
// write attributes
@ -322,7 +322,7 @@ function saveUserProfile($account, $profile) {
if (isset($account->smb_pwdcanchange)) fputs($file, "smb_pwdcanchange: " . $account->smb_pwdcanchange . "\n");
if (isset($account->smb_pwdmustchange)) fputs($file, "smb_pwdmustchange: " . $account->smb_pwdmustchange . "\n");
if (isset($account->smb_homedrive)) fputs($file, "smb_homedrive: " . $account->smb_homedrive . "\n");
if (isset($account->smb_scriptpath)) fputs($file, "smb_scriptpath: " . $scriptpath . "\n");
if (isset($account->smb_scriptPath)) fputs($file, "smb_scriptPath: " . $scriptPath . "\n");
if (isset($account->smb_profilePath)) fputs($file, "smb_profilePath: " . $profpath . "\n");
if (isset($account->smb_smbuserworkstations)) fputs($file, "smb_smbuserworkstations: " . $account->smb_smbuserworkstations . "\n");
if (isset($account->smb_smbhome)) fputs($file, "smb_smbhome: " . $smbhome . "\n");

View File

@ -209,11 +209,11 @@ if ($_GET['type'] == "user") {
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
exit;
}
if ($_POST['smb_scriptpath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_scriptpath'])) {
$acct->smb_scriptpath = $_POST['smb_scriptpath'];
if ($_POST['smb_scriptPath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_scriptPath'])) {
$acct->smb_scriptPath = $_POST['smb_scriptPath'];
}
elseif ($_POST['smb_scriptpath']) {
StatusMessage("ERROR", "", _("Script path is invalid!") . " " . $_POST['smb_scriptpath']);
elseif ($_POST['smb_scriptPath']) {
StatusMessage("ERROR", "", _("Script path is invalid!") . " " . $_POST['smb_scriptPath']);
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
exit;
}

View File

@ -297,7 +297,7 @@ echo ("</tr>\n");
// path to logon scripts
echo ("<tr>\n");
echo ("<td align=\"right\"><b>" . _("Script path") . ": </b></td>\n");
echo ("<td><input type=\"text\" value=\"" . $acct->smb_scriptpath . "\" name=\"smb_scriptpath\"></td>\n");
echo ("<td><input type=\"text\" value=\"" . $acct->smb_scriptPath . "\" name=\"smb_scriptPath\"></td>\n");
echo ("<td><a href=\"../help.php?HelpNumber=307\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo ("</tr>\n");