From: cajus Date: Sat, 1 Mar 2008 11:07:37 +0000 (+0000) Subject: Fixed post scripts X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4e4526b47b8ec7d9b8ec8aa76f526e2e375c25e4;p=gosa.git Fixed post scripts git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9224 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 89642ff57..6bf6e73db 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -601,16 +601,16 @@ class plugin /* Additional attributes */ foreach ($add_attrs as $name => $value){ - $command= preg_replace("/%$name/", $value, $command); + $command= preg_replace("/%$name( |$)/", "$value ", $command); } /* Walk through attribute list */ foreach ($this->attributes as $attr){ if (!is_array($this->$attr)){ - $command= preg_replace("/%$attr/", $this->$attr, $command); + $command= preg_replace("/%$attr( |$)/", $this->$attr." ", $command); } } - $command= preg_replace("/%dn/", $this->dn, $command); + $command= preg_replace("/%dn( |$)/", $this->dn." ", $command); if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, @@ -633,16 +633,16 @@ class plugin /* Additional attributes */ foreach ($add_attrs as $name => $value){ - $command= preg_replace("/%$name/", $value, $command); + $command= preg_replace("/%$name( |$)/", "$value ", $command); } /* Walk through attribute list */ foreach ($this->attributes as $attr){ if (!is_array($this->$attr)){ - $command= preg_replace("/%$attr/", $this->$attr, $command); + $command= preg_replace("/%$attr( |$)/", $this->$attr." ", $command); } } - $command= preg_replace("/%dn/", $this->dn, $command); + $command= preg_replace("/%dn( |$)/", $this->dn." ", $command); if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, @@ -664,21 +664,16 @@ class plugin /* Additional attributes */ foreach ($add_attrs as $name => $value){ - $command= preg_replace("/%$name/", $value, $command); + $command= preg_replace("/%$name( |$)/", "$value ", $command); } /* Walk through attribute list */ foreach ($this->attributes as $attr){ if (!is_array($this->$attr)){ - $command= preg_replace("/%$attr/", $this->$attr, $command); + $command= preg_replace("/%$attr( |$)/", $this->$attr." ", $command); } } - $command= preg_replace("/%dn/", $this->dn, $command); - - /* Additional attributes */ - foreach ($add_attrs as $name => $value){ - $command= preg_replace("/%$name/", $value, $command); - } + $command= preg_replace("/%dn( |$)/", $this->dn." ", $command); if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,