From d96fbe9a8651a1ed1487eccb87d6807065cdf5e2 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 23 Dec 2010 18:53:43 +0100 Subject: [PATCH] Some hackish way to respect $conf['reminder']['server_name']. In the long term this need to move to horde and set in horde/bin/alarms. --- kronolith/lib/Event.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index 142a9d6ca..467e08e84 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -1536,6 +1536,12 @@ abstract class Kronolith_Event } } + $serverName = $_SERVER['SERVER_NAME']; + $serverConf = $GLOBALS['conf']['server']['name']; + if (!empty($GLOBALS['conf']['reminder']['server_name'])) { + $_SERVER['SERVER_NAME'] = $GLOBALS['conf']['server']['name'] = $GLOBALS['conf']['reminder']['server_name']; + } + if (empty($user)) { $user = $GLOBALS['registry']->getAuth(); } @@ -1596,7 +1602,7 @@ abstract class Kronolith_Event $methods['mail']['mimepart'] = Kronolith::buildMimeMessage($view, 'mail', $image); } - return array( + $alarm = array( 'id' => $this->uid, 'user' => $user, 'start' => $start, @@ -1605,6 +1611,11 @@ abstract class Kronolith_Event 'params' => $methods, 'title' => $this->getTitle($user), 'text' => $this->description); + + $_SERVER['SERVER_NAME'] = $serverName; + $GLOBALS['conf']['server']['name'] = $serverConf; + + return $alarm; } /** -- 2.11.0