scriptpath -> scriptPath update
This commit is contained in:
parent
292b7addee
commit
fc36ed2457
|
@ -159,8 +159,8 @@ function loadUserProfile($profile) {
|
||||||
$acc->smb_homedrive = chop(substr($line, 15, strlen($line)-15));
|
$acc->smb_homedrive = chop(substr($line, 15, strlen($line)-15));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (substr($line, 0, 16) == "smb_scriptpath: ") {
|
if (substr($line, 0, 16) == "smb_scriptPath: ") {
|
||||||
$acc->smb_scriptpath = chop(substr($line, 16, strlen($line)-16));
|
$acc->smb_scriptPath = chop(substr($line, 16, strlen($line)-16));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (substr($line, 0, 17) == "smb_profilePath: ") {
|
if (substr($line, 0, 17) == "smb_profilePath: ") {
|
||||||
|
@ -289,18 +289,18 @@ function saveUserProfile($account, $profile) {
|
||||||
// replace user and group names
|
// replace user and group names
|
||||||
$homedir = $account->general_homedir;
|
$homedir = $account->general_homedir;
|
||||||
$profpath = $account->smb_profilePath;
|
$profpath = $account->smb_profilePath;
|
||||||
$scriptpath = $account->smb_scriptpath;
|
$scriptPath = $account->smb_scriptPath;
|
||||||
$smbhome = $account->smb_smbhome;
|
$smbhome = $account->smb_smbhome;
|
||||||
if ($account->general_username) {
|
if ($account->general_username) {
|
||||||
$homedir = str_replace($account->general_username, "\$user", $homedir);
|
$homedir = str_replace($account->general_username, "\$user", $homedir);
|
||||||
$profpath = str_replace($account->general_username, "\$user", $profpath);
|
$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);
|
$smbhome = str_replace($account->general_username, "\$user", $smbhome);
|
||||||
}
|
}
|
||||||
if ($account->general_group) {
|
if ($account->general_group) {
|
||||||
$homedir = str_replace($account->general_group, "\$group", $homedir);
|
$homedir = str_replace($account->general_group, "\$group", $homedir);
|
||||||
$profpath = str_replace($account->general_group, "\$group", $profpath);
|
$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);
|
$smbhome = str_replace($account->general_group, "\$group", $smbhome);
|
||||||
}
|
}
|
||||||
// write attributes
|
// 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_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_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_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_profilePath)) fputs($file, "smb_profilePath: " . $profpath . "\n");
|
||||||
if (isset($account->smb_smbuserworkstations)) fputs($file, "smb_smbuserworkstations: " . $account->smb_smbuserworkstations . "\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");
|
if (isset($account->smb_smbhome)) fputs($file, "smb_smbhome: " . $smbhome . "\n");
|
||||||
|
|
|
@ -209,11 +209,11 @@ if ($_GET['type'] == "user") {
|
||||||
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($_POST['smb_scriptpath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_scriptpath'])) {
|
if ($_POST['smb_scriptPath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_scriptPath'])) {
|
||||||
$acct->smb_scriptpath = $_POST['smb_scriptpath'];
|
$acct->smb_scriptPath = $_POST['smb_scriptPath'];
|
||||||
}
|
}
|
||||||
elseif ($_POST['smb_scriptpath']) {
|
elseif ($_POST['smb_scriptPath']) {
|
||||||
StatusMessage("ERROR", "", _("Script path is invalid!") . " " . $_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>");
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,7 +297,7 @@ echo ("</tr>\n");
|
||||||
// path to logon scripts
|
// path to logon scripts
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Script path") . ": </b></td>\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 ("<td><a href=\"../help.php?HelpNumber=307\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue