always send an imgs array, even if it's empty
authorMichael J Rubinsky <mrubinsk@horde.org>
Mon, 3 Jan 2011 18:56:29 +0000 (13:56 -0500)
committerMichael J Rubinsky <mrubinsk@horde.org>
Mon, 3 Jan 2011 18:56:29 +0000 (13:56 -0500)
ansel/js/mobile.js
ansel/lib/Gallery.php

index 615f0d1..18b73d6 100644 (file)
@@ -184,4 +184,4 @@ var AnselMobile = {
         });
     }
 };
-$(AnselMobile.onDocumentReady);
\ No newline at end of file
+$(AnselMobile.onDocumentReady);
index a28ff89..26022f9 100644 (file)
@@ -1018,12 +1018,13 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical implements Seria
         $json->dm = $this->get('date_modified');
         $json->d = $this->get('desc');
         $json->ki = Ansel::getImageUrl($this->getKeyImage(), 'mini', false, Ansel::getStyleDefinition('ansel_default'))->toString();
+        $json->imgs = array();
 
         // Parent
         $parents = $this->get('parents');
         if (empty($parents)) {
             $json->p = null;
-            $json->pn - null;
+            $json->pn = null;
         } else {
             $parents = explode(':', $parents);
             $json->p = array_pop($parents);