Make sure url is a string, not a Horde_Url object when returned via the API
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 31 Aug 2010 22:25:23 +0000 (18:25 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 31 Aug 2010 23:06:00 +0000 (19:06 -0400)
ansel/lib/Api.php

index 7ff5341..43aa79f 100644 (file)
@@ -670,8 +670,7 @@ class Ansel_Api extends Horde_Registry_Api
      */
     public function listGalleries($params = array())
     {
-        // If no app is given use Ansel's own gallery which is initialized in
-        // base.php
+        // If no app is given use Ansel's own gallery
         if (!empty($params['scope'])) {
             $GLOBALS['injector']->getInstance('Ansel_Config')->set('scope', $params['scope']);
         }
@@ -808,6 +807,7 @@ class Ansel_Api extends Horde_Registry_Api
             if (!is_null($app) && $GLOBALS['conf']['vfs']['src'] != 'direct') {
                 $imagelist[$id]['url']->add('app', $app);
             }
+            $imagelist[$id]['url'] = $imagelist[$id]['url']->toString();
         }
         return $imagelist;
     }