Code

Added info parameter, to display phpinfo().
[gosa.git] / setup / class_setup.inc
index 84c21be3dcc2761cc5e6f8809593dad4fb4eec4f..d1d73fb8ae7c778ea78f4777e4f28c33eac36707 100644 (file)
@@ -59,6 +59,20 @@ class setup
 
   function execute()
   {
+    /* Display phpinfo() dialog when $_GET['info'] is set,
+     *  but only do this, if user is allowed to use the setup.
+     * If setupStep_Welcome is_completed, we are allowed to view those infos-
+     */
+    if(isset($_GET['info']) && get_class($this->o_steps[1]) == "Step_Welcome" && $this->o_steps[1]->is_completed()){
+      phpinfo();
+    }
+
+    /* display step error msgs */
+    $msgs = $this->o_steps[$this->i_current]->check();
+    foreach($msgs as $msg){
+      print_red($msg);
+    }
+
     $this->o_steps[$this->i_last]->set_active(FALSE);
     $this->o_steps[$this->i_current]->set_active();
     $content = $this->o_steps[$this->i_current]->execute();
@@ -246,11 +260,7 @@ class setup
         $str .= "<input type='button' name='last' value='"._("Back")."' disabled>";
       }
       $str.= "&nbsp;";
-      if(isset($this->o_steps[$this->i_current + 1])){
         $str .= "<input type='submit' name='next' value='"._("Continue")."'>";
-      }else{
-        $str .= "<input type='button' value='"._("Continue")."' disabled>";
-      }
       $str .="</div>";
     }
     return($str);