summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fe1a88)
raw | patch | inline | side by side (parent: 1fe1a88)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Jan 2008 10:15:39 +0000 (10:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Jan 2008 10:15:39 +0000 (10:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8584 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/addons/gotomasses/class_gotomasses.inc | patch | blob | history | |
gosa-core/plugins/addons/gotomasses/gotomasses.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc b/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc
index 0bafd52128f86e728e4457bc0acdd62a552608f5..ff7697c37c8c292800972581608b15e391a36200 100644 (file)
$this->ids_to_remove = $ids;
$tmp = "";
- foreach($this->ids_to_remove as $key => $id){
- if($this->o_queue->id_exists($id)){
- $task = $this->o_queue->get_entry($id);
- $tmp.= "\n".$task['HEADERTAG']." ".$task['MACADDRESS'];
- }else{
- unset($this->ids_to_remove[$key]);
- }
- }
- $smarty->assign("multiple", TRUE);
- $smarty->assign("info",sprintf(_("Your are about to delete the following tasks: %s"),"<pre>".$tmp."</pre>"));
- $this->current = $s_entry;
- return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
+
+ $ret = $this->o_queue->ids_exist($this->ids_to_remove);
+ $ret = $this->o_queue->get_entries_by_id($ret);
+
+ foreach($ret as $task){
+ $tmp.= "\n".$task['HEADERTAG']." ".$task['MACADDRESS'];
+ }
+ $smarty->assign("multiple", TRUE);
+ $smarty->assign("info",sprintf(_("Your are about to delete the following tasks: %s"),"<pre>".$tmp."</pre>"));
+ $this->current = $s_entry;
+ return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
}
}
/* Remove specified tasks */
if(count($this->ids_to_remove) && isset($_POST['delete_multiple_confirm'])){
- foreach($this->ids_to_remove as $id){
- $this->o_queue->remove_entry($id);
- }
+ $this->o_queue->remove_entries($this->ids_to_remove);
$this->save();
}
/* Edit selected entry */
if($s_action == "edit"){
- $entry = $this->o_queue->get_entry($s_entry);
+ $entry = $this->o_queue->get_entry_by_id($s_entry);
if($entry){
$this->dialog = new goto_task($this->config,$this,$entry);
$this->current = $s_entry;
*/
private function start_queue_entry($id)
{
- $attr = $this->o_queue->get_entry($id);
+ $attr = $this->o_queue->get_entry_by_id($id);
if(is_array($attr)){
$data = array("timestamp" => date("YmdHis"),
"status" => "-");
*/
private function stop_queue_entry($id)
{
- $attr = $this->o_queue->get_entry($id);
+ $attr = $this->o_queue->get_entry_by_id($id);
if(is_array($attr)){
$data = array("timestamp" => "20370101010000",
"status" => "stopped");
diff --git a/gosa-core/plugins/addons/gotomasses/gotomasses.tpl b/gosa-core/plugins/addons/gotomasses/gotomasses.tpl
index 8586a8d39db967bd1eaa1676b74e22a8aa6ec496..c4437b0d430121233651528a638c874678289ff6 100644 (file)
{$div}
<div style="width:65%; text-align: center; float:left;" >
{if $start == 0 }
- <input type="button" name="dummy" value="< {t}Last{/t}" disabled>
+ <input type="button" name="dummy" value="< {t}Back{/t}" disabled>
{$start+1}
<input type="submit" name="next_page" value="{t}Next{/t} >">
{else}
- <input type="submit" name="last_page" value="< {t}Last{/t}">
+ <input type="submit" name="last_page" value="< {t}Back{/t}">
{$start_real}
<input type="submit" name="next_page" value="{t}Next{/t} >">
{/if}