Inheritance: extends CommonDBTM
 /**
  * @since version 0.85
  *
  * @see commonDBTM::getRights()
  **/
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     unset($values[UPDATE], $values[CREATE], $values[READ]);
     if ($interface == 'central') {
         $values[self::UPDATEALL] = __('Update all');
         $values[self::ADDALLTICKET] = __('Add to all tickets');
         $values[self::SEEPRIVATE] = __('See private ones');
     }
     $values[self::SEEPUBLIC] = __('See public ones');
     if ($interface == 'helpdesk') {
         unset($values[PURGE]);
     }
     return $values;
 }
Beispiel #2
0
 /**
  * Display a Planning Item
  *
  * @param $val       array of the item to display
  * @param $who             ID of the user (0 if all)
  * @param $type            position of the item in the time block (in, through, begin or end)
  *                         (default '')
  * @param $complete        complete display (more details) (default 0)
  *
  * @return Nothing (display function)
  **/
 static function displayPlanningItem(array $val, $who, $type = "", $complete = 0)
 {
     return parent::genericDisplayPlanningItem(__CLASS__, $val, $who, $type, $complete);
 }
Beispiel #3
0
 /**
  * Display a Planning Item
  *
  * @param $val       array of the item to display
  * @param $who             ID of the user (0 if all)
  * @param $type            position of the item in the time block (in, through, begin or end)
  *                         (default '')
  * @param $complete        complete display (more details) (default 0)
  *
  * @return Nothing (display function)
  **/
 static function displayPlanningItem(array $val, $who, $type = "", $complete = 0)
 {
     return parent::genericDisplayPlanningItem('ProblemTask', $val, $who, $type, $complete);
 }
function plugin_item_add_update_timezones_tasks(CommonITILTask $parm)
{
    global $DB;
    $itemType = $parm->getType();
    $begin = isset($parm->fields['begin']) ? $parm->fields['begin'] : '';
    $end = isset($parm->fields['end']) ? $parm->fields['end'] : '';
    $query = "REPLACE INTO `glpi_plugin_timezones_tasks_localtimes` (`items_type`, `items_id`, `begin`, `end`) VALUES ('{$itemType}', " . $parm->getID() . ", '{$begin}', '{$end}');";
    $DB->query($query);
}