Ejemplo n.º 1
0
 /**
  * Restores a single deleted task (if supported)
  *
  * @param array Hash array with task properties
  * @return boolean True on success, False on error
  * @see tasklist_driver::undelete_task()
  */
 public function undelete_task($prop)
 {
     return parent::undelete_task($prop);
 }
Ejemplo n.º 2
0
 /**
  * Load tasks
  */
 function load_tasks($cals, $query = array('since' => 1), $virtual = false)
 {
     $events = array();
     $dbtasks = new tasklist_database_driver($this->cal);
     $tasks = (array) $dbtasks->list_tasks($query, $cals, $virtual);
     foreach ($tasks as $task) {
         $task['_type'] = 'task';
         if ($task['date']) {
             $due = $task['date'] . ' ' . ($task['time'] ? $task['time'] . ':00' : '00:00:00');
             if (strtotime($due)) {
                 $task['due'] = new DateTime($due);
                 unset($task['date']);
                 unset($task['time']);
             }
         }
         if ($task['startdate']) {
             $start = $task['startdate'] . ' ' . ($task['starttime'] ? $task['starttime'] . ':00' : '00:00:00');
             if (strtotime($start)) {
                 $task['start'] = new DateTime($start);
                 unset($task['startdate']);
                 unset($task['starttime']);
             }
         }
         $events[] = $task;
     }
     return $events;
 }