index 8ae807992ea217da787fb42990ede73407aa53c4..588a9e0bef73c33fd103395fa4d766b48527dd65 100644 (file)
unset($this->saved_attributes[$index]);
continue;
}
- if (isset($this->saved_attributes[$index][0]) && $this->saved_attributes[$index]["count"] == 1){
- $tmp= $this->saved_attributes[$index][0];
- unset($this->saved_attributes[$index]);
- $this->saved_attributes[$index]= $tmp;
- continue;
- }
+ if (isset($this->saved_attributes[$index][0])){
+ if(!isset($this->saved_attributes[$index]["count"])){
+ $this->saved_attributes[$index]["count"] = count($this->saved_attributes[$index]);
+ }
+ if($this->saved_attributes[$index]["count"] == 1){
+ $tmp= $this->saved_attributes[$index][0];
+ unset($this->saved_attributes[$index]);
+ $this->saved_attributes[$index]= $tmp;
+ continue;
+ }
+ }
unset($this->saved_attributes["$index"]["count"]);
}
if(isset($this->attrs['gosaUnitTag'])){
/* Additional attributes */
foreach ($tmp as $name => $len){
$value = $add_attrs[$name];
- $command= preg_replace("/%$name/", "$value ", $command);
+ $command= preg_replace("/%$name/", "$value", $command);
}
if (check_command($command)){
exec($command);
} else {
- $message[]= msgPool::cmdnotfound("POSTCREATE", get_class($this));
+ $message= msgPool::cmdnotfound("POSTCREATE", get_class($this));
msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
/* Additional attributes */
foreach ($tmp as $name => $len){
$value = $add_attrs[$name];
- $command= preg_replace("/%$name/", "$value ", $command);
+ $command= preg_replace("/%$name/", "$value", $command);
}
if (check_command($command)){
@DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,$command, "Execute");
exec($command);
} else {
- $message[]= msgPool::cmdnotfound("POSTMODIFY", get_class($this));
+ $message= msgPool::cmdnotfound("POSTMODIFY", get_class($this));
msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
/* Additional attributes */
foreach ($tmp as $name => $len){
$value = $add_attrs[$name];
- $command= preg_replace("/%$name/", "$value ", $command);
+ $command= preg_replace("/%$name/", "$value", $command);
}
if (check_command($command)){
exec($command);
} else {
- $message[]= msgPool::cmdnotfound("POSTREMOVE", get_class($this));
+ $message= msgPool::cmdnotfound("POSTREMOVE", get_class($this));
msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
foreach ($this->config->adepartments as $key => $ntag){
/* This one is bigger than our dn, its not relevant... */
- if ($len <= strlen($key)){
+ if ($len < strlen($key)){
continue;
}