From e91b5bca79a6bc8f3922050320cc65607b3cb627 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 18 Feb 2010 10:47:50 +0000 Subject: [PATCH] Added back release information git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15647 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_systemManagement.inc | 32 ++++++++++++------- .../systems/admin/systems/system-list.xml | 2 +- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 95e5b3cff..eb6b8e232 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -86,12 +86,12 @@ class systemManagement extends management $this->storagePoints = array_unique($sP); // Build filter -# if (session::global_is_set(get_class($this)."_filter")){ - # $filter= session::global_get(get_class($this)."_filter"); - # } else { + if (session::global_is_set(get_class($this)."_filter")){ + $filter= session::global_get(get_class($this)."_filter"); + } else { $filter = new filter(get_template_path("system-filter.xml", true)); $filter->setObjectStorage($this->storagePoints); - # } + } $this->setFilter($filter); // Build headpage @@ -146,9 +146,6 @@ class systemManagement extends management $this->opsi = new opsi($this->config); } parent::__construct($config, $ui, "systems", $headpage); - - // Used to generate an 'ogroup' icon within the description field. - session::set('SYSTEMS_DESCRIPTION_FILTER', $headpage); } @@ -1348,13 +1345,26 @@ class systemManagement extends management } - function systemRelease($a,$b,$c,$d) + static function systemRelease($a,$b,$c,$objectclasses= null,$class= null) { global $config; - // A ... solution, but I can't figure out a better solution right now. - $headpage = session::get('SYSTEMS_DESCRIPTION_FILTER'); - if(!is_array($d) || !count($d) || !is_object($headpage)) return(" "); + // No objectclasses set - go ahead + if(!$objectclasses) return(" "); + + // Skip non fai objects + if (!in_array_ics("FAIobject", $objectclasses)) { + return " "; + } + + // If we've an own fai class, just use this + if ($class && is_array($class)) { + foreach (explode(' ', $class[0]) as $element) { + if ($element[0] == ":") { + return mb_substr($element, 1); + } + } + } $ldap = $config->get_ldap_link(); $ldap->cd($config->current['BASE']); diff --git a/gosa-plugins/systems/admin/systems/system-list.xml b/gosa-plugins/systems/admin/systems/system-list.xml index 563d7fd12..a7cca5c4d 100644 --- a/gosa-plugins/systems/admin/systems/system-list.xml +++ b/gosa-plugins/systems/admin/systems/system-list.xml @@ -185,7 +185,7 @@ description string - %{filter:systemRelease(row,dn,"%s",FAIclass)} + %{filter:systemRelease(row,dn,"%s",objectClass,FAIclass)} true -- 2.30.2