From 08cb0c03a8b42984475bee0ebb6f0706b261912b Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 8 Jan 2010 10:38:01 +0000 Subject: [PATCH] Updated filter git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15121 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_systemManagement.inc | 8 ++++++++ gosa-plugins/systems/admin/systems/system-filter.xml | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 5128ca66d..c3efc23d9 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -64,6 +64,8 @@ class systemManagement extends management $headpage = new listing(get_template_path("system-list.xml", true)); $headpage->setFilter($filter); + $filter->setConverter('INCOMING', 'systemManagement::incomingFilterConverter'); + // Add copy&paste and snapshot handler. if ($this->config->boolValueIsTrue("main", "copyPaste")){ $this->cpHandler = new CopyPasteHandler($this->config); @@ -74,6 +76,12 @@ class systemManagement extends management parent::__construct($config, $ui, "systems", $headpage); } + static function incomingFilterConverter($filter) + { + $rdn = preg_replace("/^[^=]*=/", "", get_ou('systemIncomingRDN')); + $rdn = preg_replace("/,.*$/","",$rdn); + return(preg_replace("/%systemIncomingRDN/", $rdn,$filter)); + } /*! \brief Overridden render method of class mangement. diff --git a/gosa-plugins/systems/admin/systems/system-filter.xml b/gosa-plugins/systems/admin/systems/system-filter.xml index 9b1f30595..bb9f5942c 100644 --- a/gosa-plugins/systems/admin/systems/system-filter.xml +++ b/gosa-plugins/systems/admin/systems/system-filter.xml @@ -10,11 +10,12 @@ SYSTEMS - (&(|$SERVER $WORKSTATION $TERMINAL $PRINTER $COMPONENT $WINSTATION )$NAME) + (&(|$SERVER $WORKSTATION $TERMINAL $PRINTER $COMPONENT $WINSTATION $INCOMING)$NAME) dn objectClass cn description + gotoMode macAddress auto @@ -81,7 +82,7 @@ INCOMING true - (objectClass=goWorkstation) + (&(|(objectClass=goWorkstation)(objectClass=gotoTerminal)(objectClass=goHard))(ou:dn:=%systemIncomingRDN)) -- 2.30.2