Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 23 additions & 25 deletions config/hooks.php.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

/**
* Nag Hooks configuration file.
*
Expand All @@ -11,31 +10,30 @@
*
* $Id$
*/
if (!class_exists('Nag_Hooks')) {
class Nag_Hooks
{
/**
* TODO
*/
// public function 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', function ($m) { return '<a href="/horde/mnemo/notes/?q=' . urlencode($m[1]) . '">' . htmlspecialchars($m[0]) . '</a>'; }, $text);
// $text = preg_replace_callback('/\[\[task: ?(.*)\]\]/i', function ($m) { return '<a href="/horde/nag/tasks/?q=' . urlencode($m[1]) . '">' . htmlspecialchars($m[0]) . '</a>'; }, $text);
//
// return $text;
// }

class Nag_Hooks
{
/**
* TODO
*/
// public function 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', function ($m) { return '<a href="/horde/mnemo/notes/?q=' . urlencode($m[1]) . '">' . htmlspecialchars($m[0]) . '</a>'; }, $text);
// $text = preg_replace_callback('/\[\[task: ?(.*)\]\]/i', function ($m) { return '<a href="/horde/nag/tasks/?q=' . urlencode($m[1]) . '">' . htmlspecialchars($m[0]) . '</a>'; }, $text);
//
// return $text;
// }


/**
* TODO
*/
// public function 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>';
// }
/**
* TODO
*/
// public function 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>';
// }

}
}
Loading