index 728f5808ac90e0131f9a5416081ac8eb7c78df08..f0f30057c2e57cad7f5a8ce3fc5e9095446ac35a 100644 (file)
*/
-class setup_step_6a extends setup_step
+class Step_Config3 extends setup_step
{
+ var $header_image= "images/ldapserver.png";
+
+ var $errorlvl = TRUE;
+
+ var $login_attributes = array("uid" => "uid",
+ "mail" => "mail",
+ "uid,mail" => "both");
var $optional = array(
- "enableCopyPaste" => false,
+ "login_attribute" => "uid",
+ "strict_units" => false,
+ "list_summary" => false,
"forceglobals" => true,
"forcessl" => false,
+ "ldapstats" => false,
"warnssl" => true,
+ "user_filter_cookie" => true,
"ppd_path" => "/var/spool/ppd/",
"ppd_path_active" => FALSE,
"compile" => "/var/spool/gosa",
+ "snmpcommunity" => "goto",
"debuglevel" => 0,
"session_lifetime" => 7200,
"max_ldap_query_time" => "5.0",
"mailQueueScriptPath" => "/usr/bin/sudo /usr/local/sbin/mailqueue %action %id %server",
"mailQueueScriptPath_active" => FALSE,
- "auto_network_hook" => "/etc/gosa/net-resolv.sh",
+ "auto_network_hook" => "/usr/bin/net-resolver.sh",
"auto_network_hook_active" => FALSE,
"notifydir" => "",
"notifydir_active" => FALSE,
- "noprimarygroup" => FALSE,
- "smbhash" => 'SMBHASH');
+ "kioskpath" => "/var/spool/kiosk",
+ "kioskpath_active" => FALSE,
+ "gotomasses_file" => "/etc/gosa/gotomasses",
+ "gotomasses_active" => FALSE,
- function setup_step_6a()
- {
- $this->update_strings();
+ "noprimarygroup" => FALSE);
- /* Look for samba password generation method */
- if(file_exists("/usr/bin/mkntpasswd")){
- $pwdhash = "/usr/bin/mkntpasswd";
- } elseif (preg_match("/^Usage: mkntpwd /", shell_exec ("mkntpwd 2>&1"))){
- $pwdhash= "mkntpwd";
- } else {
- $pwdhash= 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen \$ARGV[0]), $/;"';
- }
+ var $attributes = array("errorlvl");
- $this->optional['smbhash'] = $pwdhash;
+ function Step_Config3()
+ {
+ $this->update_strings();
}
function update_strings()
{
$this->s_title = _("GOsa settings 3/3");
- $this->s_title_long = _("GOsa generic settings, page 3/3");
- $this->s_info = _("This dialog allows you to setup GOsa behaviour");
+ $this->s_title_long = _("GOsa settings 3/3");
+ $this->s_info = _("Tweak some GOsa core behaviour");
}
{
$smarty = get_smarty();
$smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
-
$smarty->assign("optional", $this->optional);
-
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
}
-
- $smarty->assign("warnings" ,$this->check());
- $smarty->assign("warnings_cnt" ,count($this->check()));
-
- return($smarty -> fetch (get_template_path("../setup/setup_step6a.tpl")));
+ $smarty->assign("login_attributes",$this->login_attributes);
+ return($smarty -> fetch (get_template_path("../setup/setup_config3.tpl")));
}
/* Get attributes */
foreach($this->attributes as $attr){
if(isset($_POST[$attr])){
- $this->$attr = validate($_POST[$attr]);
+ $this->$attr = validate(get_post($attr));
}
}
- foreach(array("noprimarygroup","enableCopyPaste","forceglobals","forcessl","warnssl","compile","debuglevel","session_lifetime","smbhash") as $name){
+ foreach(array("login_attribute","list_summary","strict_units","snmpcommunity","noprimarygroup","forceglobals","forcessl","ldapstats","user_filter_cookie","warnssl","compile","debuglevel","session_lifetime") as $name){
if(isset($_POST[$name])){
- $this->optional[$name] = stripslashes($_POST[$name]);
+ $this->optional[$name] = get_post($name);
}
}
if(isset($_POST['ppd_path_active'])){
$this->optional['ppd_path_active'] = TRUE;
if(isset($_POST['ppd_path'])){
- $this->optional['ppd_path'] = $_POST['ppd_path'];
+ $this->optional['ppd_path'] = get_post('ppd_path');
}
}else{
$this->optional['ppd_path_active'] = FALSE;
if(isset($_POST['max_ldap_query_time_active'])){
$this->optional['max_ldap_query_time_active'] = TRUE;
if(isset($_POST['max_ldap_query_time'])){
- $this->optional['max_ldap_query_time'] = $_POST['max_ldap_query_time'];
+ $this->optional['max_ldap_query_time'] = get_post('max_ldap_query_time');
}
}else{
$this->optional['max_ldap_query_time_active'] = FALSE;
if(isset($_POST['mailQueueScriptPath_active'])){
$this->optional['mailQueueScriptPath_active'] = TRUE;
if(isset($_POST['mailQueueScriptPath'])){
- $this->optional['mailQueueScriptPath'] = $_POST['mailQueueScriptPath'];
+ $this->optional['mailQueueScriptPath'] = get_post('mailQueueScriptPath');
}
}else{
$this->optional['mailQueueScriptPath_active'] = FALSE;
}
+ if(isset($_POST['kioskpath_active'])){
+ $this->optional['kioskpath_active'] = TRUE;
+ if(isset($_POST['kioskpath'])){
+ $this->optional['kioskpath'] = get_post('kioskpath');
+ }
+ }else{
+ $this->optional['kioskpath_active'] = FALSE;
+ }
+
+ if(isset($_POST['gotomasses_active'])){
+ $this->optional['gotomasses_active'] = TRUE;
+ if(isset($_POST['gotomasses_file'])){
+ $this->optional['gotomasses_file'] = get_post('gotomasses_file');
+ }
+ }else{
+ $this->optional['gotomasses_active'] = FALSE;
+ }
+
if(isset($_POST['auto_network_hook_active'])){
$this->optional['auto_network_hook_active'] = TRUE;
if(isset($_POST['auto_network_hook'])){
- $this->optional['auto_network_hook'] = $_POST['auto_network_hook'];
+ $this->optional['auto_network_hook'] = get_post('auto_network_hook');
}
}else{
$this->optional['auto_network_hook_active'] = FALSE;
if(isset($_POST['notifydir_active'])){
$this->optional['notifydir_active'] = TRUE;
if(isset($_POST['notifydir'])){
- $this->optional['notifydir'] = $_POST['notifydir'];
+ $this->optional['notifydir'] = get_post('notifydir');
}
}else{
$this->optional['notifydir_active'] = FALSE;