From 6b609ec162bcc7efee4da79009f9e299e15d7688 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Sat, 14 Feb 2026 12:51:43 -0500 Subject: [PATCH] Revert "fix: Add conditional to hook class template to prevent double declaration issues" This reverts commit f32876b3453c15ad0366cc094beb4dd2d86b0c8b. --- config/hooks.php.dist | 48 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/config/hooks.php.dist b/config/hooks.php.dist index 07629239..4fe7c27f 100644 --- a/config/hooks.php.dist +++ b/config/hooks.php.dist @@ -1,5 +1,4 @@ \0', $text); - // $text = preg_replace('/(bug|ticket|request|enhancement|issue):\s*#?(\d+)/i', '\0', $text); - // - // $text = preg_replace_callback('/\[\[note: ?(.*)\]\]/i', function ($m) { return '' . htmlspecialchars($m[0]) . ''; }, $text); - // $text = preg_replace_callback('/\[\[task: ?(.*)\]\]/i', function ($m) { return '' . htmlspecialchars($m[0]) . ''; }, $text); - // - // return $text; - // } + +class Nag_Hooks +{ + /** + * TODO + */ +// public function format_description($text) +// { +// $text = preg_replace('/#(\d+)/', '\0', $text); +// $text = preg_replace('/(bug|ticket|request|enhancement|issue):\s*#?(\d+)/i', '\0', $text); +// +// $text = preg_replace_callback('/\[\[note: ?(.*)\]\]/i', function ($m) { return '' . htmlspecialchars($m[0]) . ''; }, $text); +// $text = preg_replace_callback('/\[\[task: ?(.*)\]\]/i', function ($m) { return '' . htmlspecialchars($m[0]) . ''; }, $text); +// +// return $text; +// } - /** - * TODO - */ - // public function description_help() - // { - // return '

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.

'; - // } + /** + * TODO + */ +// public function description_help() +// { +// return '

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.

'; +// } - } }