From 69907df243514ee2e9ee3dce90a2b4fda09176ec Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 8 May 2007 09:01:05 +0000 Subject: [PATCH] Disable steps after ldap connection setup, if connection setup is modified git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6293 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setup.inc | 11 +++++++++++ setup/class_setupStep_Ldap.inc | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/setup/class_setup.inc b/setup/class_setup.inc index 2f65cd775..d93dada1d 100644 --- a/setup/class_setup.inc +++ b/setup/class_setup.inc @@ -300,6 +300,17 @@ class setup } return(false); } + + function step_name_to_id($name) + { + foreach($this->o_steps as $id => $class){ + if(get_class($class) == $name){ + return($id); + } + } + return(0); + } + } diff --git a/setup/class_setupStep_Ldap.inc b/setup/class_setupStep_Ldap.inc index 79238f2ce..c982eec68 100644 --- a/setup/class_setupStep_Ldap.inc +++ b/setup/class_setupStep_Ldap.inc @@ -132,6 +132,10 @@ class Step_Ldap extends setup_step { foreach($this->attributes as $attr){ if(isset($_POST[$attr])){ + + if(in_array($attr,array("base","connection")) && $this->$attr != get_post($attr)){ + $this->parent->disable_steps_from($this->parent->step_name_to_id(get_class($this))); + } $this->$attr = get_post($attr); } } -- 2.30.2