summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3257a2f)
raw | patch | inline | side by side (parent: 3257a2f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Jun 2006 04:32:44 +0000 (04:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Jun 2006 04:32:44 +0000 (04:32 +0000) |
Fixed printer membership saving. array('count'=>'0') was also saved as member.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4000 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4000 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 5b5881132cfdbfe1133981ca51c15a09280f6eb3..59be3400076a91950515821d18d0080fc69d1d98 100644 (file)
/* Remove normal entries (User)*/
if(isset($attr['goto'.$s_suffix.'Printer'])) {
+ unset($attr['goto'.$s_suffix.'Printer']['count']);
foreach($attr['goto'.$s_suffix.'Printer'] as $key => $user){
if($this->uid==$user){
unset($attr['goto'.$s_suffix.'Printer'][$key]);
/* Remove administrational entries (Admin)*/
if(isset($attr['goto'.$s_suffix.'AdminPrinter'])){
+ unset($attr['goto'.$s_suffix.'AdminPrinter']['count']);
foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $key => $user){
if($this->uid==$user){
unset($attr['goto'.$s_suffix.'AdminPrinter'][$key]);
/* Save changes */
$ldap->cd($attr['dn']);
+ $dn = $attr['dn'];
unset($attr['dn']);
-$ldap->modify ($attr);
-
- if($ldap->get_error()!="Success"){
- print_red(_("Error while writing printer")." : ".$ldap->get_error());
- }
+
+ $ldap->modify ($attr);
+ show_ldap_error($ldap->get_error(),sprintf(_("Saving printer membership with dn %s failed "),$dn));
}
/* All printers are cleaned, (our cn/uid removed)