X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_plugin.inc;h=8e992dccc33c03b894848d7fe53767a16b168040;hb=9cbc6b4a12e04d2e0410acf79ef4715d24e24231;hp=f9a5b3a7878a94980514534ced443d0f9b2dd0a0;hpb=1f2a9f1002febad6ef9e3adeb54cf366c7315d74;p=gosa.git diff --git a/include/class_plugin.inc b/include/class_plugin.inc index f9a5b3a78..8e992dccc 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -383,6 +383,11 @@ class plugin } } } + + /* Update saved attributes and ensure that next cleanups will be successful too */ + foreach($this->attrs as $name => $value){ + $this->saved_attributes[$name] = $value; + } } /* Check formular input */ @@ -536,6 +541,12 @@ class plugin } if ($command != ""){ + + /* Additional attributes */ + foreach ($add_attrs as $name => $value){ + $command= preg_replace("/%$name/", $value, $command); + } + /* Walk through attribute list */ foreach ($this->attributes as $attr){ if (!is_array($this->$attr)){ @@ -544,11 +555,6 @@ class plugin } $command= preg_replace("/%dn/", $this->dn, $command); - /* Additional attributes */ - foreach ($add_attrs as $name => $value){ - $command= preg_replace("/%$name/", $value, $command); - } - if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); @@ -570,6 +576,12 @@ class plugin } if ($command != ""){ + + /* Additional attributes */ + foreach ($add_attrs as $name => $value){ + $command= preg_replace("/%$name/", $value, $command); + } + /* Walk through attribute list */ foreach ($this->attributes as $attr){ if (!is_array($this->$attr)){ @@ -578,11 +590,6 @@ class plugin } $command= preg_replace("/%dn/", $this->dn, $command); - /* Additional attributes */ - foreach ($add_attrs as $name => $value){ - $command= preg_replace("/%$name/", $value, $command); - } - if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); @@ -604,6 +611,12 @@ class plugin } if ($command != ""){ + + /* Additional attributes */ + foreach ($add_attrs as $name => $value){ + $command= preg_replace("/%$name/", $value, $command); + } + /* Walk through attribute list */ foreach ($this->attributes as $attr){ if (!is_array($this->$attr)){