Skip to content

Commit

Permalink
This will not catch an exception due to encrypted note.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 16, 2013
1 parent 8ea5e65 commit 2699323
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions mnemo/lib/Api.php
Expand Up @@ -314,17 +314,7 @@ public function import($content, $contentType, $notepad = null)
public function export($uid, $contentType, array $options = array())
{
$storage = $GLOBALS['injector']->getInstance('Mnemo_Factory_Driver')->create();
try {
$memo = $storage->getByUID($uid);
} catch (Mnemo_Exception $e) {
if ($e->getCode() == Mnemo::ERR_NO_PASSPHRASE ||
$e->getCode() == Mnemo::ERR_DECRYPT) {

$memo['body'] = _("This note has been encrypted.");
} else {
throw $e;
}
}
$memo = $storage->getByUID($uid);
if (!array_key_exists($memo['memolist_id'], Mnemo::listNotepads(false, Horde_Perms::READ))) {
throw new Horde_Exception_PermissionDenied();
}
Expand Down

0 comments on commit 2699323

Please sign in to comment.