/etc/horde/whups/hooks.php.dist is in php-horde-whups 3.0.0~beta1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | <?php
/**
* Whups Hooks configuration file.
*
* THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY. DO NOT ENABLE THEM
* BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING. YOU HAVE TO CUSTOMIZE THEM
* TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
*
* For more information please see the horde/config/hooks.php.dist file.
*/
class Whups_Hooks
{
/**
* This is an example hook that customizes the grouping of ticket fields.
*
* It splits all fields into two groups, one for custom attribute fields
* and one for the regular fields. Additionally, it moves the 'queue'
* field at the top of the regular fields list.
*/
// public function group_fields($type, $fields)
// {
// $common_fields = $attributes = array();
// foreach ($fields as $field) {
// if (substr($field, 0, 10) == 'attribute_') {
// $attributes[] = $field;
// } elseif ($field == 'queue') {
// array_unshift($common_fields, $field);
// } else {
// $common_fields[] = $field;
// }
// }
// return array('Common Fields' => $common_fields,
// 'Attributes' => $attributes);
// }
/**
* This is an example hook that intercepts ticket changes.
*
* If a comment has been added to a closed ticket, it will re-open the
* ticket, setting the state to "assigned". You might want to use numeric
* ids for the 'to' item in a real life hook.
*/
// public function ticket_update($ticket, $changes)
// {
// /* We only want to change the ticket state if it is closed, a comment
// * has been added, and the state hasn't been changed already. */
// if (!empty($changes['comment']) &&
// empty($changes['state']) &&
// $ticket->get('state_category') == 'resolved') {
// /* Pick the first state from the state category 'assigned'. */
// $states = $GLOBALS['whups_driver']->getStates($ticket->get('type'),
// 'assigned');
// /* These three item have to exist in a change set. */
// $changes['state'] = array(
// 'to' => key($states),
// 'from' => $ticket->get('state'),
// 'from_name' => $ticket->get('state_name'));
// }
//
// return $changes;
// }
}
|