search_sources pref is json encoded (Bug #9252).
authorJan Schneider <jan@horde.org>
Tue, 21 Sep 2010 14:41:04 +0000 (16:41 +0200)
committerJan Schneider <jan@horde.org>
Tue, 21 Sep 2010 14:41:04 +0000 (16:41 +0200)
kronolith/lib/FreeBusy.php

index e258b9a..1feb149 100644 (file)
@@ -254,8 +254,10 @@ class Kronolith_FreeBusy
      */
     public static function getUrl($email)
     {
-        $sources = $GLOBALS['prefs']->getValue('search_sources');
-        $sources = empty($sources) ? array() : explode("\t", $sources);
+        $sources = json_decode($GLOBALS['prefs']->getValue('search_sources'));
+        if (empty($sources)) {
+            $sources = array();
+        }
 
         try {
             $result = $GLOBALS['registry']->call('contacts/getField',