From: Chuck Hagenbuch Date: Sat, 15 Jan 2011 15:40:55 +0000 (-0500) Subject: Fix variable name in error message, and redirect away if saving fails X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4aff30f9d9096aa4b1e57b27dc63964192e75959;p=horde.git Fix variable name in error message, and redirect away if saving fails --- 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