From: hickert Date: Fri, 24 Aug 2007 10:35:02 +0000 (+0000) Subject: Updated gotomasses in trunk X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2ba164cd9189a466d089b74151d1e6de76d45304;p=gosa.git Updated gotomasses in trunk git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7130 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/gotomasses/class_goto_task.inc b/plugins/addons/gotomasses/class_goto_task.inc index b905318ff..43e72b2d2 100644 --- a/plugins/addons/gotomasses/class_goto_task.inc +++ b/plugins/addons/gotomasses/class_goto_task.inc @@ -348,7 +348,6 @@ class goto_task extends plugin function save_object() { if(isset($_POST['goto_task_posted'])){ - plugin::save_object(); if(isset($_POST['configure_dns'])){ $this->configure_dns = TRUE; @@ -369,6 +368,7 @@ class goto_task extends plugin $this->configure_dhcp = FALSE; $this->Section = "\"\""; } + plugin::save_object(); } } diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index 1accb6bf2..79bfcbf46 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -19,6 +19,7 @@ class gotomasses extends plugin var $dialog = FALSE; var $ids_to_remove = array(); + function gotomasses($config, $dn= NULL) { /* Include config object */ @@ -325,7 +326,7 @@ class gotomasses extends plugin $row = preg_replace('/ */umi'," ",$row); $parts = split(" ",$row); - if(count($parts) != 8){ + if(count($parts) != 10){ print_red(_("Entry broken, skipped.")); }else{ @@ -337,11 +338,16 @@ class gotomasses extends plugin $entry['Weekday'] = $parts[4]; $entry['Action'] = $parts[5]; $entry['OGroup'] = $parts[6]; + $entry['Zone'] = $parts[7]; + $entry['Section'] = $parts[8]; if($entry['Action'] == "initial_install"){ - $tmp2 = split(";",$parts[7]); + $tmp2 = split(";",$parts[9]); foreach($tmp2 as $target){ $tmp = split(",",$target); - $entry['Initial_Target'][] = array("MAC" => $tmp[0],"IP"=>$tmp[1],"NAME" => $tmp[2]); + $entry['Initial_Target'][] = array( + "MAC" => $tmp[0], + "IP" => $tmp[1], + "NAME" => $tmp[2]); } $entry['Target'] = array(); }else{ @@ -372,6 +378,8 @@ class gotomasses extends plugin } $str .= str_pad($task['Action'] ,5," ")." "; $str .= str_pad($task['OGroup'] ,5," ")." "; + $str .= str_pad($task['Zone'] ,5," ")." "; + $str .= str_pad($task['Section'],5," ")." "; if($task['Action'] == "initial_install"){ foreach($task['Initial_Target'] as $target){ $str .= trim($target['MAC']).",".trim($target['IP']).",".trim($target['NAME']).";"; diff --git a/plugins/addons/gotomasses/goto_task.tpl b/plugins/addons/gotomasses/goto_task.tpl index 799d910b3..36779680c 100644 --- a/plugins/addons/gotomasses/goto_task.tpl +++ b/plugins/addons/gotomasses/goto_task.tpl @@ -51,28 +51,6 @@ - - - - - - - - - - - - - - - -