Use ansel_default for any style names that don't currently exist.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 16 Sep 2010 22:34:02 +0000 (18:34 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 16 Sep 2010 22:34:02 +0000 (18:34 -0400)
ansel/scripts/upgrades/2010-09-16_migrate_styles.php

index b698fb0..654114f 100644 (file)
@@ -30,7 +30,7 @@ $defaults = array(
 $rows = $ansel_db->queryAll($sql);
 $update = $ansel_db->prepare('UPDATE ansel_shares SET attribute_style=? WHERE share_id=?;');
 foreach ($rows as $row) {
-    if ($row[1] == 'ansel_default') {
+    if ($row[1] == 'ansel_default' || empty($styles[$row[1]])) {
         $newStyle = '';
     } else {
         $properties = array_merge($defaults, $styles[$row[1]]);