need to ensureHash() when creating a new stack too
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 30 Dec 2010 19:38:14 +0000 (14:38 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 30 Dec 2010 19:41:53 +0000 (14:41 -0500)
ansel/lib/Gallery.php

index 44583c6..7e812db 100644 (file)
@@ -638,6 +638,10 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical implements Seria
                 $prettyData = serialize(array_merge($thumbs, array($styleHash => $newImg->id)));
                 $this->set('default_prettythumb', $prettyData, true);
 
+                // Make sure the hash is saved since it might be different then
+                // the gallery's
+                $GLOBALS['injector']->getInstance('Ansel_Storage')->ensureHash($styleHash);
+
                 return $newImg->id;
             } catch (Horde_Exception $e) {
                 // Might not support the requested style...try ansel_default