Code

There is a seperate button for each admin create method
[gosa.git] / setup / class_setupStep_Welcome.inc
index 06c3237474bcd620adf709282014bf24b8ec9c16..f030f3121191817e1c4ca690e880c4f9d8fd1163 100644 (file)
@@ -24,7 +24,7 @@ class Step_Welcome  extends setup_step
 {
   var $languages      = array();
   var $attributes     = array();
-  var $header_image   = "images/locale.png";
+  var $header_image   = "images/welcome.png";
 
   function Step_Welcome()
   {
@@ -36,19 +36,34 @@ class Step_Welcome  extends setup_step
   function update_strings()
   {
     $this->s_title      = _("Welcome");
-    $this->s_title_long = _("Welcome to GOsa setup");
-    $this->s_info       = _("Welcome to GOsa setup");
+    $this->s_info       = _("The welcome message");
+    $this->s_title_long = _("Welcome to GOsa setup wizard");
   }
   
   function execute()
   {
-    $this->is_completed = true;
     $smarty = get_smarty();
+    $smarty->assign('auth_id', session_id());
     return($smarty->fetch(get_template_path("setup_welcome.tpl",TRUE,dirname(__FILE__))));
   }
 
   function save_object()
   {
+    $id = "";
+    
+    /* Get auth ID from file */
+    if (file_exists('/tmp/gosa.auth') && is_readable('/tmp/gosa.auth')){
+      $contents= file('/tmp/gosa.auth');
+      $id= chop($contents[0]);
+    }
+
+    /* Continue if we've the correct ID */
+    if ($id == session_id()){
+      $this->is_completed = true;
+    } else {
+      $this->is_completed = false;
+    }
+
   }
 }