diff --git a/setup/class_setup.inc b/setup/class_setup.inc
index a774c50433de1fa5c51b85feecaab7ba36f5da96..753751c52537d7e43e28845244038b07f8eea244 100644 (file)
--- a/setup/class_setup.inc
+++ b/setup/class_setup.inc
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
require_once("class_setupStep.inc");
+
class setup
{
var $i_steps = 9; // Number of setup steps
$this->o_steps[$i++] = new Step_Config2();
$this->o_steps[$i++] = new Step_Config3();
$this->o_steps[$i++] = new Step_Migrate();
+ $this->o_steps[$i++] = new Step_Feedback();
$this->o_steps[$i++] = new Step_Finish();
$this->i_steps = $i-1;
}
foreach($this->o_steps as $key => $step){
- $this->o_steps[$key]->parent = $this;
+ $this->o_steps[$key]->parent = &$this;
}
}
* 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()){
+ if(isset($_GET['info']) && preg_match("/Step_Welcome/i",get_class($this->o_steps[1])) && $this->o_steps[1]->is_completed()){
phpinfo();
exit();
}
}
return(false);
}
+
+ function step_name_to_id($name)
+ {
+ foreach($this->o_steps as $id => $class){
+ if(get_class($class) == $name){
+ return($id);
+ }
+ }
+ return(0);
+ }
+
}