Code

Updated setup.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 May 2008 13:23:43 +0000 (13:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 May 2008 13:23:43 +0000 (13:23 +0000)
-Identification verification is now variable. (Welcome dialog)
-Added sslog options to setup

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10848 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/setup/class_setupStep_Config2.inc
gosa-core/setup/class_setupStep_Welcome.inc
gosa-core/setup/setup_config2.tpl
gosa-core/setup/setup_welcome.tpl

index 450fe81e1c20c6ef30dbb700f57526944166cfba..ff3a9718a127f59b544e1dcb1eaa10b3363a2699 100644 (file)
@@ -42,6 +42,7 @@ class Step_Config2 extends setup_step
                                   "snapshot_base"       => "ou=snapshots,%base%",
                                   "snapshot_user"       => "%admin%",
                                   "snapshot_password"   => "",
+                                  "logging"             => "syslog,mysql",
                                   "snapshot_server"     => "%connection%");
 
   var $samba_settings    = array( "samba_sid"        => "0-815-4711",
@@ -159,6 +160,10 @@ class Step_Config2 extends setup_step
     $smarty->assign("mail_settings",$this->mail_settings);
     $smarty->assign("mail_methods",$this->mail_methods);
     $smarty->assign("samba_settings",$this->samba_settings);
+
+    $smarty->assign("logging_mysql" ,preg_match("/mysql/",$this->generic_settings['logging']));
+    $smarty->assign("logging_syslog",preg_match("/syslog/",$this->generic_settings['logging']));
+   
     $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
@@ -185,6 +190,16 @@ class Step_Config2 extends setup_step
         }
       }
 
+      /* Get logging */
+      $logging = "";
+      if(isset($_POST['logging_syslog'])){
+        $logging.= "syslog,";
+      }
+      if(isset($_POST['logging_mysql'])){
+        $logging.= "mysql,";
+      }
+      $this->generic_settings['logging'] = trim($logging,",");
+
       /* Mail settings */
       if(isset($_POST['vacationdir_active'])){
         $this->mail_settings['vacationdir_active'] = TRUE;
index f030f3121191817e1c4ca690e880c4f9d8fd1163..cfe14cf6d8ac49abb1b2e641cf5e1fe1eadbc398 100644 (file)
@@ -44,6 +44,8 @@ class Step_Welcome  extends setup_step
   {
     $smarty = get_smarty();
     $smarty->assign('auth_id', session_id());
+
+    $smarty->assign("path",TEMP_DIR.'/gosa.auth');
     return($smarty->fetch(get_template_path("setup_welcome.tpl",TRUE,dirname(__FILE__))));
   }
 
@@ -52,8 +54,9 @@ class Step_Welcome  extends setup_step
     $id = "";
     
     /* Get auth ID from file */
-    if (file_exists('/tmp/gosa.auth') && is_readable('/tmp/gosa.auth')){
-      $contents= file('/tmp/gosa.auth');
+    $path = TEMP_DIR.'/gosa.auth';
+    if (file_exists($path) && is_readable($path)){
+      $contents= file($path);
       $id= chop($contents[0]);
     }
 
index 62bdafc4cf97837bfd6f3edceaca1d1c3ba75164..3ed7daec9ac28659f395fbacb8b60fcb0d44bf86 100644 (file)
         </div>
     </div>
 
+    <div class='step4_container'>
+        <div class='step4_name'>
+            {t}Logging options{/t}
+        </div>
+        <div class='step4_value'>
+                       <input type='checkbox' name='logging_syslog' value='1' 
+                               {if $logging_syslog} checked {/if} class='center'>{t}Syslog{/t} 
+                       <input type='checkbox' name='logging_mysql' value='1' 
+                               {if $logging_mysql} checked {/if} class='center'>{t}MySQL{/t}
+        </div>
+    </div>
+
+
     <p><b>{t}Mail settings{/t}</b></p>
 
     <div class='step4_container'>
index e6f76c7b6a94c07740b94613c11270fab818d98b..5333adeab77a5f3186502988475c67c021152588 100644 (file)
@@ -28,7 +28,7 @@
        {t}For security reasons you need to authenticate for the installation by creating the file '/tmp/gosa.auth', containing the current session ID on the servers local filesystem. This can be done by executing the following command:{/t}
        </p>
        <tt>
-       echo -n <b>{$auth_id}</b> &gt; /tmp/gosa.auth
+       echo -n <b>{$auth_id}</b> &gt; {$path}
        </tt>
        <p>
        {t}Click the 'Continue' button when you've finished.{/t}