Code

Added copy & paste for profiles
[gosa.git] / setup / class_setupStep_Config3.inc
index cb1d28c8ad91a3ba9726631f6dce1e718e3760af..eaa5368b1675414d929feabea7db604d65b7d880 100644 (file)
@@ -26,9 +26,13 @@ class Step_Config3 extends setup_step
 
   var $errorlvl   = TRUE;
 
+  var $login_attributes = array("uid"       => "uid", 
+                                "mail"      => "mail",
+                                "uid,mail"  => "both");
   var $optional = array(
+              "login_attribute" => "uid",
               "strict_units" => false,
-              "list_summary" => true,
+              "list_summary" => false,
               "forceglobals" => true,
               "forcessl" => false,
               "ldapstats" => false,
@@ -37,6 +41,7 @@ class Step_Config3 extends setup_step
               "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",
@@ -51,6 +56,9 @@ class Step_Config3 extends setup_step
               "notifydir" => "",
               "notifydir_active" => FALSE,
 
+              "uniq_identifier" => "entryCSN",
+              "uniq_identifier_active" => TRUE,
+
               "kioskpath" => "/var/spool/kiosk",
               "kioskpath_active" => FALSE,
 
@@ -79,10 +87,13 @@ class Step_Config3 extends setup_step
   {
     $smarty = get_smarty();
     $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
+    $smarty->assign("uniq_identifiers",array( "entryCNS" => "entryCSN",
+                                              "contextCSN"=>"contextCSN" ));
     $smarty->assign("optional", $this->optional);
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
     }
+    $smarty->assign("login_attributes",$this->login_attributes);
     return($smarty -> fetch (get_template_path("../setup/setup_config3.tpl")));
   }
 
@@ -98,7 +109,7 @@ class Step_Config3 extends setup_step
         }
       }
       
-      foreach(array("list_summary","strict_units","noprimarygroup","forceglobals","forcessl","ldapstats","user_filter_cookie","warnssl","compile","debuglevel","session_lifetime") 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] = get_post($name);
         }
@@ -166,6 +177,15 @@ class Step_Config3 extends setup_step
       }else{
         $this->optional['notifydir_active'] = FALSE;
       }
+
+      if(isset($_POST['uniq_identifier_active'])){
+        $this->optional['uniq_identifier_active'] = TRUE;
+        if(isset($_POST['uniq_identifier'])){
+          $this->optional['uniq_identifier'] = get_post('uniq_identifier');
+        }
+      }else{
+        $this->optional['uniq_identifier_active'] = FALSE;
+      }
     }
 
     $tmp = $this->check();