From: Michael M Slusarz Date: Sun, 22 Nov 2009 00:31:54 +0000 (-0700) Subject: Improvements to saveimage script X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=26df23f8032097b660bf28b4c98f7839a9644de0;p=horde.git Improvements to saveimage script --- diff --git a/imp/saveimage.php b/imp/saveimage.php index 12189b7b2..59e573905 100644 --- a/imp/saveimage.php +++ b/imp/saveimage.php @@ -1,5 +1,7 @@ getMIMEPart($id); $image_data = array( - 'filename' => $mime_part->getName(true), - 'description' => $mime_part->getDescription(true), 'data' => $mime_part->getContents(), + 'description' => $mime_part->getDescription(true), + 'filename' => $mime_part->getName(true), 'type' => $mime_part->getType() ); try { @@ -37,6 +38,11 @@ case 'save_image': exit; } +if (!$registry->hasMethod('images/selectGalleries') || + !$registry->hasMethod('images/saveImage')) { + throw new Horde_Exception(_("Image saving is not available.")); +} + /* Build the template. */ $t = new Horde_Template(); $t->setOption('gettext', true);