File: hooks.php.dist

package info (click to toggle)
nag2 2.3.4%2Bdebian0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 6,256 kB
  • ctags: 1,719
  • sloc: php: 6,797; xml: 589; sql: 335; makefile: 75; sh: 26
file content (26 lines) | stat: -rw-r--r-- 1,374 bytes parent folder | download
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
<?php
/**
 * Example hooks for Nag
 *
 * $Horde: nag/config/hooks.php.dist,v 1.1.2.1 2008-11-26 21:25:25 chuck Exp $
 */

// if (!function_exists('_nag_hook_format_description')) {
//     function _nag_hook_format_description($text)
//     {
//         $text = preg_replace('/#(\d+)/', '<a href="http://bugs.horde.org/ticket/\1">\0</a>', $text);
//         $text = preg_replace('/(bug|ticket|request|enhancement|issue):\s*#?(\d+)/i', '<a href="http://bugs.horde.org/ticket/\1">\0</a>', $text);
// 
//         $text = preg_replace_callback('/\[\[note: ?(.*)\]\]/i', create_function('$m', 'return \'<a href="/horde/mnemo/notes/?q=\' . urlencode($m[1]) . \'">\' . htmlspecialchars($m[0]) . \'</a>\';'), $text);
//         $text = preg_replace_callback('/\[\[task: ?(.*)\]\]/i', create_function('$m', 'return \'<a href="/horde/nag/tasks/?q=\' . urlencode($m[1]) . \'">\' . htmlspecialchars($m[0]) . \'</a>\';'), $text);
// 
//         return $text;
//     }
// }

// if (!function_exists('_nag_hook_description_help')) {
//     function _nag_hook_description_help()
//     {
//         return '<p>To create a link to a bug, use #123 where 123 is the bug number. To create a link to another task, use [[task: name]], where name is the beginning of the task name. To create a link to a note, use [[note: title]] where title is the beginning of the note title.</p>';
//     }
// }