From 1b5ad0c268f34e34169492d8c6ccf4545f3cc89e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 27 Jul 2006 11:34:43 +0000 Subject: [PATCH] Fixed problem with empty attributes when creating a new printer extension git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4326 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index e60cd78f6..0d285eb70 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -720,6 +720,13 @@ class printgeneric extends plugin $this->attrs['objectClass'][] = "gosaAdministrativeUnitTag"; } + if($this->orig_dn == 'new'){ + foreach(array("gotoGroupPrinter","gotoUserAdminPrinter","gotoGroupAdminPrinter","gotoUserPrinter") as $checkVar){ + if(count($this->attrs[$checkVar]) == 0 || empty($this->attrs[$checkVar])){ + unset($this->attrs[$checkVar]); + } + } + } /* Write back to ldap */ $ldap= $this->config->get_ldap_link(); -- 2.30.2