Fix fetching known style hashes.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 30 Dec 2010 19:14:16 +0000 (14:14 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 30 Dec 2010 19:41:13 +0000 (14:41 -0500)
Temp fix until we move to Horde_Db

ansel/lib/Storage.php

index 20e5709..e4bc993 100644 (file)
@@ -1166,5 +1166,10 @@ class Ansel_Storage
     public function getHashes()
     {
         $hashes = $this->_db->query('SELECT style_hash FROM ansel_hashes');
+        if (!($hashes instanceof PEAR_Error)) {
+            return $hashes->fetchCol();
+        } else {
+            throw new Ansel_Exception($hashes);
+        }
     }
 }