\n$text \n";
+ $display= "";
@@ -367,14 +377,16 @@ class plugin
{
/* Find postcreate entries for this class */
$command= search_config($this->config->data['MENU'], get_class($this), "POSTCREATE");
- if ($command == ""){
- $command= search_config($this->config->data['SERVICE'], get_class($this), "POSTCREATE");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "POSTCREATE");
}
if ($command != ""){
/* Walk through attribute list */
foreach ($this->attributes as $attr){
- $command= preg_replace("/%$attr/", $this->$attr, $command);
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
}
$command= preg_replace("/%dn/", $this->dn, $command);
if (check_command($command)){
@@ -393,14 +405,16 @@ class plugin
{
/* Find postcreate entries for this class */
$command= search_config($this->config->data['MENU'], get_class($this), "POSTMODIFY");
- if ($command == ""){
- $command= search_config($this->config->data['SERVICE'], get_class($this), "POSTMODIFY");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "POSTMODIFY");
}
if ($command != ""){
/* Walk through attribute list */
foreach ($this->attributes as $attr){
- $command= preg_replace("/%$attr/", $this->$attr, $command);
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
}
$command= preg_replace("/%dn/", $this->dn, $command);
if (check_command($command)){
@@ -419,14 +433,16 @@ class plugin
{
/* Find postremove entries for this class */
$command= search_config($this->config->data['MENU'], get_class($this), "POSTREMOVE");
- if ($command == ""){
- $command= search_config($this->config->data['SERVICE'], get_class($this), "POSTREMOVE");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "POSTREMOVE");
}
if ($command != ""){
/* Walk through attribute list */
foreach ($this->attributes as $attr){
- $command= preg_replace("/%$attr/", $this->$attr, $command);
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
}
$command= preg_replace("/%dn/", $this->dn, $command);
if (check_command($command)){
@@ -480,7 +496,7 @@ class plugin
$this->reconnect= true;
return (0);
} else {
- $this->error = "Could not bind to " . $binddn;
+ $this->error = "Could not bind to " . $credentials['ADMIN'];
return NULL;
}
}
|