From c31dd0239c9ec7fc71143a1aa907bb06d8242d79 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 23 Oct 2007 07:23:40 +0000 Subject: [PATCH] Added option to enable/disable ip range selection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7623 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/gotomasses/class_target_list.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/addons/gotomasses/class_target_list.inc b/plugins/addons/gotomasses/class_target_list.inc index cdae5cb18..1e69057a9 100644 --- a/plugins/addons/gotomasses/class_target_list.inc +++ b/plugins/addons/gotomasses/class_target_list.inc @@ -23,6 +23,7 @@ class target_list extends MultiSelectWindow /* Subsearch checkbox */ var $SubSearch ; + var $IPMatch ; var $parent ; var $ui ; @@ -54,6 +55,7 @@ class target_list extends MultiSelectWindow /* Add SubSearch checkbox */ $this->AddCheckBox(SEPERATOR); $this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Search in subtrees"), false); + $this->AddCheckBox("IPMatch", _("Select to search for a specific IP range only"), _("Match IP range"), false); /* Name,Text,Default , Connect with alphabet */ $this->AddRegex ("Regex", _("Regular expression for matching group names"), "*" , true); @@ -263,9 +265,11 @@ class target_list extends MultiSelectWindow $tmp=array(); foreach($this->list as $tkey => $val ){ - if(isset($val['ipHostNumber'][0])){ - if(is_ip_range($IP_start,$val['ipHostNumber'][0]) && is_ip_range($val['ipHostNumber'][0],$IP_end)){ - $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val; + if($this->IPMatch){ + if(isset($val['ipHostNumber'][0])){ + if(is_ip_range($IP_start,$val['ipHostNumber'][0]) && is_ip_range($val['ipHostNumber'][0],$IP_end)){ + $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val; + } } }else{ $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val; -- 2.30.2