From b591c3d0d2cc65073f421b8037f6e73bedf78bee Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 19 Jul 2006 10:56:46 +0000 Subject: [PATCH] Fixed removing of members. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4234 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 2f1ccd595..6363daca1 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -28,7 +28,6 @@ class printgeneric extends plugin var $AdminMembers =array(); var $AdminMemberKeys =array(); - var $gotoUserPrinter ; var $PPDdialogToSave = NULL; var $BelongsTo = "unknown"; // Specifies if this is a standalone printer, or belongs to a terminal / WS @@ -40,8 +39,14 @@ class printgeneric extends plugin var $baseSelection = false; var $macAddress = ""; + var $gotoUserAdminPrinter; + var $gotoGroupAdminPrinter ; + var $gotoGroupPrinter; + var $gotoUserPrinter ; + /* attribute list for save action */ - var $attributes = array("cn", "description", "l", "labeledURI", "gotoPrinterPPD","gotoUserPrinter", "macAddress"); + var $attributes = array("cn", "description", "l", "labeledURI", "gotoPrinterPPD","gotoUserPrinter", "macAddress", + "gotoUserAdminPrinter","gotoGroupAdminPrinter","gotoUserPrinter","gotoGroupPrinter"); var $objectclasses = array("top", "gotoPrinter"); function printgeneric ($config, $dn= NULL,$parent = NULL) @@ -674,32 +679,33 @@ class printgeneric extends plugin }else{ $method="http://"; } - + $this->attrs['gotoPrinterPPD'] = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD); /* Append printer user */ - if((isset($this->attrs['gotoUserPrinter'])) && (is_string($this->attrs['gotoUserPrinter']))){ - $this->attrs['gotoUserPrinter']=array(); - } + $this->attrs['gotoUserPrinter']=array(); foreach($this->member['AddUser'] as $mem){ $this->attrs['gotoUserPrinter'][]=$mem['uid'][0]; } /* Append printer group */ + $this->attrs['gotoGroupPrinter'] = array(); foreach($this->member['AddGroup'] as $mem){ $this->attrs['gotoGroupPrinter'][]=$mem['cn'][0]; } /* Append printer admin user */ + $this->attrs['gotoUserAdminPrinter'] = array(); foreach($this->member['AddAdminUser'] as $mem){ $this->attrs['gotoUserAdminPrinter'][]=$mem['uid'][0]; } /* Append printer admin group */ + $this->attrs['gotoGroupAdminPrinter']= array(); foreach($this->member['AddAdminGroup'] as $mem){ $this->attrs['gotoGroupAdminPrinter'][]=$mem['cn'][0]; } @@ -708,6 +714,7 @@ class printgeneric extends plugin $this->attrs['objectClass'][] = "gosaAdministrativeUnitTag"; } + /* Write back to ldap */ $ldap= $this->config->get_ldap_link(); if ($this->orig_dn == 'new'){ -- 2.30.2