From: Michael J. Rubinsky Date: Thu, 17 Jun 2010 18:54:52 +0000 (-0400) Subject: fix saving images to the image api from IMP X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1941375af043934aaa683a6ef0d2f9637413b467;p=horde.git fix saving images to the image api from IMP --- diff --git a/imp/lib/Contents.php b/imp/lib/Contents.php index ec27ff89e..9526ee9d8 100644 --- a/imp/lib/Contents.php +++ b/imp/lib/Contents.php @@ -669,7 +669,7 @@ class IMP_Contents if (($mask & self::SUMMARY_IMAGE_SAVE) && $GLOBALS['registry']->hasMethod('images/selectGalleries') && ($mime_part->getPrimaryType() == 'image')) { - $part['img_save'] = Horde::link('#', _("Save Image in Gallery"), 'saveImgAtc', null, Horde::popupJs(Horde::applicationUrl('saveimage.php'), array('params' => array('mbox' => $this->_mailbox, 'uid' => $this->_uid, 'id' => $id), 'height' => 200, 'width' => 450)) . 'return false;') . ''; + $part['img_save'] = Horde::link('#', _("Save Image in Gallery"), 'saveImgAtc', null, Horde::popupJs(Horde::applicationUrl('saveimage.php'), array('params' => array('mbox' => $this->_mailbox, 'uid' => $this->_uid, 'id' => $id), 'height' => 200, 'width' => 450, 'urlencode' => true)) . 'return false;') . ''; } /* Add print link? */ diff --git a/imp/saveimage.php b/imp/saveimage.php index 90e4c42fd..aece59154 100644 --- a/imp/saveimage.php +++ b/imp/saveimage.php @@ -30,7 +30,7 @@ case 'save_image': 'type' => $mime_part->getType() ); try { - $registry->images->saveImage(null, $vars->gallery, $image_data); + $registry->images->saveImage($vars->gallery, $image_data); } catch (Horde_Exception $e) { $notification->push($e); break; @@ -50,6 +50,7 @@ $t->setOption('gettext', true); $t->set('action', Horde::applicationUrl('saveimage.php')); $t->set('id', htmlspecialchars($vars->id)); $t->set('uid', htmlspecialchars($vars->uid)); +$t->set('mbox', htmlspecialchars($vars->mbox)); $t->set('image_img', Horde::img('mime/image.png', _("Image"))); /* Build the list of galleries. */ diff --git a/imp/templates/saveimage/saveimage.html b/imp/templates/saveimage/saveimage.html index 92a7e0928..f9617b2ee 100644 --- a/imp/templates/saveimage/saveimage.html +++ b/imp/templates/saveimage/saveimage.html @@ -2,6 +2,7 @@ +