summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da6cbcf)
raw | patch | inline | side by side (parent: da6cbcf)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 Feb 2010 10:47:50 +0000 (10:47 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 Feb 2010 10:47:50 +0000 (10:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15647 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_systemManagement.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/system-list.xml | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 95e5b3cffaefd72668e14441bbd5563906e7d438..eb6b8e232232c564d755359399cb84fca7acfaeb 100644 (file)
$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
$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);
}
}
- 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 563d7fd12f89015befeb8c4c46fc651a6314eb59..a7cca5c4d2b665c29b434af89ab52acc03f4251c 100644 (file)
<label>Release</label>
<sortAttribute>description</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:systemRelease(row,dn,"%s",FAIclass)}</value>
+ <value>%{filter:systemRelease(row,dn,"%s",objectClass,FAIclass)}</value>
<export>true</export>
</column>