From: Michael J. Rubinsky Date: Tue, 4 Jan 2011 01:38:25 +0000 (-0500) Subject: use the mobile style for the keyImage also X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7c4391bbf80c95b7c88315159fe401b7106e71cd;p=horde.git use the mobile style for the keyImage also --- diff --git a/ansel/lib/Gallery.php b/ansel/lib/Gallery.php index 58abab507..36d21c90d 100644 --- a/ansel/lib/Gallery.php +++ b/ansel/lib/Gallery.php @@ -1011,13 +1011,15 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical implements Seria */ public function toJson($full = false) { + $style = Ansel::getStyleDefinition('ansel_mobile'); + $json = new StdClass(); $json->id = $this->getId(); $json->n = $this->get('name'); $json->dc = $this->get('date_created'); $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->ki = Ansel::getImageUrl($this->getKeyImage($style), 'thumb', false, $style)->toString(true); $json->imgs = array(); // Parent @@ -1046,7 +1048,7 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical implements Seria foreach ($images as $img) { $i = new StdClass(); $i->id = $img->id; - $i->url = Ansel::getImageUrl($img->id, 'thumb', false, Ansel::getStyleDefinition('ansel_mobile'))->toString(true); + $i->url = Ansel::getImageUrl($img->id, 'thumb', false, $style)->toString(true); $i->screen = Ansel::getImageUrl($img->id, 'screen', $json->tiny, Ansel::getStyleDefinition('ansel_default'))->toString(true); $i->fn = $img->filename; $json->imgs[] = $i;