Fix variable name in error message, and redirect away if saving fails
authorChuck Hagenbuch <chuck@horde.org>
Sat, 15 Jan 2011 15:40:55 +0000 (10:40 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 15 Jan 2011 15:40:55 +0000 (10:40 -0500)
ansel/lib/View/GalleryProperties.php

index 890f487..6711659 100644 (file)
@@ -360,11 +360,12 @@ class Ansel_View_GalleryProperties
             } catch (Ansel_Exception $e) {
                 $galleryId = null;
                 $error = sprintf(_("The gallery \"%s\" couldn't be created: %s"),
-                                 $gallery_name, $gallery->getMessage());
+                                 $gallery_name, $e->getMessage());
                 Horde::logMessage($error, 'ERR');
                 $GLOBALS['notification']->push($error, 'horde.error');
+                Horde::url(Ansel::getUrlFor('view', array('view' => 'List'), true))->redirect();
+                exit;
             }
-
         }
 
         // Make sure that the style hash is recorded, ignoring non-styled thumbs