From ea84311f403d6298f447b2b71bc6f74265c879c8 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 21 Jan 2010 16:07:39 +0000 Subject: [PATCH] Updated System Selection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15239 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/events/class_EventTargetAddList.inc | 39 +++++++++---------- .../goto/events/eventTargetSystems-filter.xml | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc b/gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc index e0f8e6db0..01a1cabe0 100644 --- a/gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc +++ b/gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc @@ -35,13 +35,13 @@ class EventTargetAddList extends management get_ou("workstationRDN"), get_ou('terminalRDN')); -# // Build filter -# if (session::global_is_set(get_class($this)."_filter")){ -# $filter= session::global_get(get_class($this)."_filter"); -# } else { + // Build filter + if (session::global_is_set(get_class($this)."_filter")){ + $filter= session::global_get(get_class($this)."_filter"); + } else { $filter = new filter(get_template_path("../../addons/goto/events/eventTargetSystems-filter.xml", TRUE)); $filter->setObjectStorage($this->storagePoints); -# } + } $this->setFilter($filter); // Build headpage @@ -51,21 +51,6 @@ class EventTargetAddList extends management } function save_object() {} - function Draw(){ - - } - - function execute() - { - $str = management::execute(); - $str.= "

 

-

- -   - -

"; - return($str); - } function save() { @@ -78,6 +63,20 @@ class EventTargetAddList extends management } return($ret); } + + function get_selected_targets() + { + $entries = $this->save(); + $macs = array(); + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + foreach($entries as $entry){ + if(isset($entry['macAddress'][0])){ + $macs[] = $entry['macAddress'][0]; + } + } + return($macs); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/gosa-plugins/goto/addons/goto/events/eventTargetSystems-filter.xml b/gosa-plugins/goto/addons/goto/events/eventTargetSystems-filter.xml index 609dde5d0..7aa75de8d 100644 --- a/gosa-plugins/goto/addons/goto/events/eventTargetSystems-filter.xml +++ b/gosa-plugins/goto/addons/goto/events/eventTargetSystems-filter.xml @@ -102,7 +102,7 @@ checkbox BYIP - false + __FilterByIP__ -- 2.30.2