summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8fd5f3b)
raw | patch | inline | side by side (parent: 8fd5f3b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Oct 2007 06:54:55 +0000 (06:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Oct 2007 06:54:55 +0000 (06:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7622 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/addons/gotomasses/class_goto_task.inc b/plugins/addons/gotomasses/class_goto_task.inc
index 6091af34b33db16ce382ff0c577f8674e505322e..e081d836043015d376c355388bf98cc63c38a292 100644 (file)
var $Initial_Target = array();
var $Actions = array();
var $new = FALSE;
- var $attributes = array("Zone","Section","OGroup","Minute","Hour","Day","Month","Weekday","Action","Comment","Target","Initial_Target");
+ var $attributes = array("Zone","Section","OGroup","Minute","Hour","Day",
+ "Month","Weekday","Action","Comment","Target","Initial_Target");
var $configure_dhcp = FALSE;
- var $configure_dns = FALSE;
+ var $configure_dns = FALSE;
+
function goto_task(&$config, &$parent, $data = array())
{
}
/* Save selected objects as target */
- if(isset($_POST['SaveMultiSelectWindow'])){
+ if(isset($_POST['SaveMultiSelectWindow']) && is_object($this->dialog)){
$this->dialog->save_object();
$ret = $this->dialog->save();
foreach($ret as $entry){
********/
$divlist = new divlist("goto_task");
- $divlist->SetPluginMode();
+# $divlist->SetPluginMode();
+ $divlist->setHeight(200);
$divlist->SetWidth("100%");
$divlist->SetEntriesPerPage(0);
diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc
index 981c4227671c34a0b230b0d4b1e412cca766aab0..72e6bab044b2dcf8d841652a3075fe61b2af67a4 100644 (file)
/* Create divlist */
$divlist->SetListHeader($header);
- /* Toggle all selected / deselected */
+
+ /* Toggle all selected / deselected */
$chk = "<input type='checkbox' id='select_all' name='select_all'
onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
diff --git a/plugins/addons/gotomasses/class_target_list.inc b/plugins/addons/gotomasses/class_target_list.inc
index 703454e4c6772c1df978963fade49e238bc1556e..cdae5cb182456acf0b7950cce45d92e42ba92e00 100644 (file)
/* Regex */
var $Regex = "*";
+ var $IP_start = "0.0.0.0";
+ var $IP_end = "255.255.255.255";
/* CheckBoxes, to change default values modify $this->AddCheckBox */
var $ogroups ;
/* Name,Text,Default , Connect with alphabet */
$this->AddRegex ("Regex", _("Regular expression for matching group names"), "*" , true);
+ $this->AddRegex ("IP_start", _("IP range start"), "*" , true);
+ $this->AddRegex ("IP_end", _("IP range end"), "*" , true);
$this->EnableAplhabet(TRUE);
}
$this->GenHeader();
$this->reload();
$this->SetEntries($this->list);
- foreach($this->list as $key => $data){
-
- }
return($this->Draw());
}
}else{
$desc = " - [ ".$val['description'][0]." ]";
}
+ if(!isset($val['ipHostNumber'][0])){
+ $desc.= "";
+ }else{
+ $desc.= " - ".$val['ipHostNumber'][0]."";
+ }
+
$img ="Hmm";
if(in_array("goServer",$val['objectClass'])){
$base = $this->selectedBase;
$filter = "";
$Regex = $this->Regex;
+ $IP_start = $this->IP_start;
+ $IP_end = $this->IP_end;
+
+ if(!is_ip($IP_start)){
+ print_red(_("Please specify a valid IP range."));
+ return;
+ }
+ if(!is_ip($IP_end)){
+ print_red(_("Please specify a valid IP range."));
+ return;
+ }
+
$chk = array(
"ogroups" => "(&(objectClass=gosaGroupOfNames)(|(gosaGroupObjects=*S*)(gosaGroupObjects=*W*)))" ,
if($this->SubSearch){
$res= get_list($filter, array("ogroups","workstations","servers"), $base,
- array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
+ array("cn","objectClass","gosaGroupObjects","ipHostNumber","description"), GL_SIZELIMIT | GL_SUBSEARCH);
}else{
$res= get_list($filter, "ogroups", get_groups_ou().$base,
- array("cn","objectClass"), GL_SIZELIMIT );
+ array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT );
$res= array_merge($res,get_list($filter, "workstation", "ou=workstations,ou=systems,".$base,
- array("cn","objectClass"), GL_SIZELIMIT ));
+ array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
$res= array_merge($res,get_list($filter, "server", "ou=servers,ou=systems,".$base,
- array("cn","objectClass"), GL_SIZELIMIT ));
-
+ array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
}
$this->list= $res;
reset ($this->list);
$tmp=array();
foreach($this->list as $tkey => $val ){
- $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$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;
+ }
+ }else{
+ $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
+ }
}
ksort($tmp);
$this->list=array();
index 0f231aa5897870204017a4bd51b79827f1939edc..0c93fcf560b6e707b47a22631f95768d186d3bfb 100644 (file)
<tr>
<td colspan="2">
<table summary="" style="border:1px solid #B0B0B0;width:100%; " cellspacing=0 cellpadding=0>
- <tr>
+ <tr>
<td>
{render acl=$TargetACL}
{$Target_list}