summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f3e8ce)
raw | patch | inline | side by side (parent: 6f3e8ce)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Oct 2007 12:17:19 +0000 (12:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Oct 2007 12:17:19 +0000 (12:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7656 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_hostActionQueue.inc | patch | blob | history | |
plugins/addons/gotomasses/class_gotomasses.inc | patch | blob | history |
index 8f925f6732a60c73dae43b1d438fbd0e476eeb34..cbebb11ea2207fb96391581e689b35a3fb6a9b01 100644 (file)
$this->b_error = FALSE;
$this->s_error = "";
$this->i_pointer = 0;
+
+ $this->get_new_id();
/* Check file accessibility */
if(!file_exists($this->s_queue_file)){
continue;
}
- $entry_id = $taks_id= 0;
+ $entry_id = $task_id= 0;
/* Comment must be set correctly */
if(empty($comment)){
}
/* Udpate ENTRY_ID -> id mapping */
+ reset($this->a_queue);
foreach($this->a_queue as $id => $entry){
$this->id_entry_map[$entry['ID']] = $id;
}
}
$str = "#GOsa generated file, please just modify if you really know what you do.";
+ reset($this->a_queue);
foreach($this->a_queue as $task){
$str .= "\n#taskid:".trim($task['TASK_ID']).";entryid:".$task['ID'].";desc:".trim($task['Comment']);
$str .= "\n";
clearstatcache();
$this->i_fileversion = filemtime($this->s_queue_file);
clearstatcache();
+
+ /* Update ENTRY_ID -> id mapping */
+ reset($this->a_queue);
+ foreach($this->a_queue as $id => $entry){
+ $this->id_entry_map[$entry['ID']] = $id;
+ }
+
return(TRUE);
}
{
if(!$this->id_exists($id)){
$this->set_error(sprintf(_("Can't set priority for ID '%s'. ID does not exist."),$id));
+ return(FALSE);
}
$tmp = array();
$tmp[]= $this->get_entry($id);
+ reset($this->a_queue);
foreach($this->a_queue as $key => $entry){
if($id != $entry['ID']){
$tmp[] = $entry;
{
if(!$this->id_exists($id)){
$this->set_error(sprintf(_("Can't set priority for ID '%s'. ID does not exist."),$id));
+ return(FALSE);
}
$tmp = array();
$skip = NULL;
$next = NULL;
+ reset($this->a_queue);
foreach($this->a_queue as $key => $entry){
if($next != NULL){
if($id == $entry['ID']){
{
if(!$this->id_exists($id)){
$this->set_error(sprintf(_("Can't set priority for ID '%s'. ID does not exist."),$id));
+ return(FALSE);
}
$tmp = array();
$skip = NULL;
+ reset($this->a_queue);
foreach($this->a_queue as $key => $entry){
if($id != $entry['ID']){
$tmp[] = $entry;
return($this->_save_data());
}
+ private function get_new_id()
+ {
+ }
+
public function min_entry_priority($id)
{
if(!$this->id_exists($id)){
$this->set_error(sprintf(_("Can't set priority for ID '%s'. ID does not exist."),$id));
+ return(FALSE);
}
+ reset($this->a_queue);
$tmp = array();
foreach($this->a_queue as $key => $entry){
if($id != $entry['ID']){
diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc
index 1f71f7be34934018600aee076a3f563809476fde..0785eaccfd8f5a21db71d411a0c41565538fc7a9 100644 (file)
case 'prio_bottom' : $this->o_queue->min_entry_priority($s_entry);break;
default : trigger_error("Undefined priority setting used.");
}
+ if($this->o_queue->is_error()){
+ print_red($this->o_queue->get_error());
+ }
}
/************