From 5dfd4aedacc0342ec7645bbe1e64f13e7b8a4264 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 20 Jun 2014 12:37:09 +0200 Subject: [PATCH] monitoring/downtime: add missing ticket hook We used to have this when showing comments, but not for downtimes. --- .../views/scripts/show/components/downtime.phtml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 8fcb1e892..22218e4cb 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -31,8 +31,13 @@ foreach ($object->downtimes as $downtime) { 'removedowntime', $deleteData ); - - $text = $this->escape($downtime->comment); + + // Ticket hook sample + $text = $this->tickets ? preg_replace_callback( + $this->tickets->getPattern(), + array($this->tickets, 'createLink'), + $this->escape($downtime->comment) + ) : $this->escape($downtime->comment); $list[] = sprintf( '%s%s %s: %s',