From 4aff30f9d9096aa4b1e57b27dc63964192e75959 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sat, 15 Jan 2011 10:40:55 -0500 Subject: [PATCH] Fix variable name in error message, and redirect away if saving fails --- ansel/lib/View/GalleryProperties.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansel/lib/View/GalleryProperties.php b/ansel/lib/View/GalleryProperties.php index 890f487be..6711659a4 100644 --- a/ansel/lib/View/GalleryProperties.php +++ b/ansel/lib/View/GalleryProperties.php @@ -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 -- 2.11.0