Additional check if the dependencies are available.
authorGunnar Wrobel <p@rdus.de>
Sun, 28 Feb 2010 09:57:34 +0000 (10:57 +0100)
committerGunnar Wrobel <p@rdus.de>
Sun, 28 Feb 2010 09:57:34 +0000 (10:57 +0100)
framework/Notification/lib/Horde/Notification/Event/Status.php
framework/Notification/lib/Horde/Notification/Listener/Status.php

index f4fb39c..d185bd0 100644 (file)
@@ -22,7 +22,7 @@ class Horde_Notification_Event_Status extends Horde_Notification_Event
     {
         $text = $this->message;
 
-        if (!in_array('content.raw', $this->flags)) {
+        if (!in_array('content.raw', $this->flags) && class_exists('Horde_Nls')) {
             $text = htmlspecialchars($text, ENT_COMPAT, Horde_Nls::getCharset());
         }
 
index 0178b9a..28274d4 100644 (file)
@@ -38,7 +38,7 @@ class Horde_Notification_Listener_Status extends Horde_Notification_Listener
             return;
         }
 
-        if (!empty($options['mobile'])) {
+        if (!empty($options['mobile']) && class_exists('Horde_Mobile_Text')) {
             foreach ($events as $event) {
                 $options['mobile']->add(new Horde_Mobile_Text(strip_tags($event)));
             }