From: Michael M Slusarz Date: Sat, 27 Feb 2010 01:45:45 +0000 (-0700) Subject: Simplify some notification push() calls X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=77b8012d6c8c33dbd531e5aa9b2409236ec927b8;p=horde.git Simplify some notification push() calls --- diff --git a/imp/compose-dimp.php b/imp/compose-dimp.php index ed0d9a514..c017665eb 100644 --- a/imp/compose-dimp.php +++ b/imp/compose-dimp.php @@ -148,7 +148,7 @@ case 'resume': } $header = array_merge($header, $result['header']); } catch (IMP_Compose_Exception $e) { - $notification->push($e->getMessage(), 'horde.error'); + $notification->push($e); } $get_sig = false; break; diff --git a/imp/compose-mimp.php b/imp/compose-mimp.php index de46685a4..916c1ba98 100644 --- a/imp/compose-mimp.php +++ b/imp/compose-mimp.php @@ -96,7 +96,7 @@ case 'd': $sent_mail_folder = $identity->getValue('sent_mail_folder'); } } catch (IMP_Compose_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); } break; @@ -163,7 +163,7 @@ case _("Redirect"): exit; } catch (Horde_Exception $e) { $actionID = 'rc'; - $notification->push($e, 'horde.error'); + $notification->push($e); } break; @@ -234,7 +234,7 @@ case _("Send"): exit; } } catch (IMP_Compose_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); } break; @@ -259,7 +259,7 @@ case _("Send"): exit; } } catch (IMP_Compose_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); } break; } diff --git a/imp/compose.php b/imp/compose.php index f7ccf79e0..934d9a602 100644 --- a/imp/compose.php +++ b/imp/compose.php @@ -250,7 +250,7 @@ case 'draft': $sent_mail_folder = $identity->getValue('sent_mail_folder'); } } catch (IMP_Compose_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); } $get_sig = false; break; @@ -337,7 +337,7 @@ case 'redirect_send': } exit; } catch (Horde_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); $vars->actionID = 'redirect_compose'; $get_sig = false; } @@ -398,7 +398,7 @@ case 'send_message': } } catch (IMP_Compose_Exception $e) { if ($vars->actionID == 'save_draft') { - $notification->push($e, 'horde.error'); + $notification->push($e); } } } @@ -508,7 +508,7 @@ case 'selectlist_process': try { $imp_compose->addMIMEPartAttachment($part); } catch (IMP_Compose_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); } } } diff --git a/imp/folders.php b/imp/folders.php index 5659e93f3..50893b5d8 100644 --- a/imp/folders.php +++ b/imp/folders.php @@ -120,7 +120,7 @@ case 'download_folder_zip': fclose($mbox); } catch (Horde_Exception $e) { fclose($mbox); - $notification->push($e, 'horde.error'); + $notification->push($e); break; } fseek($data, 0, SEEK_END); diff --git a/imp/lib/Ajax/Application.php b/imp/lib/Ajax/Application.php index 14bec7a71..9350bab37 100644 --- a/imp/lib/Ajax/Application.php +++ b/imp/lib/Ajax/Application.php @@ -79,7 +79,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base $result->mailbox = $this->_getMailboxResponse($imptree); } } catch (Horde_Exception $e) { - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); $result = false; } @@ -169,7 +169,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base $result->mailbox = $this->_getMailboxResponse($imptree); } } catch (Horde_Exception $e) { - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); } return $result; @@ -713,7 +713,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base $GLOBALS['notification']->push(sprintf(_("%s was successfully added to your address book."), $this->_vars->name ? $this->_vars->name : $this->_vars->email), 'horde.success'); return true; } catch (Horde_Exception $e) { - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); return false; } } @@ -967,7 +967,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base } } } catch (Horde_Exception $e) { - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); $result = $this->_checkUidvalidity(); } @@ -1027,7 +1027,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base } } } catch (Horde_Exception $e) { - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); $result = $this->_checkUidvalidity(); } @@ -1494,7 +1494,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base $sent = $imp_compose->buildAndSendMessage($this->_vars->message, $headers, Horde_Nls::getEmailCharset(), $this->_vars->html, $options); } catch (IMP_Compose_Exception $e) { $result->success = 0; - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); return $result; } @@ -1614,7 +1614,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base } } catch (IMP_Compose_Exception $e) { $result->success = 0; - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); } return $result; @@ -1724,7 +1724,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base try { $GLOBALS['imp_imap']->ob()->openMailbox($this->_vars->view, $rw ? Horde_Imap_Client::OPEN_READWRITE : Horde_Imap_Client::OPEN_AUTO); } catch (Horde_Imap_Client_Exception $e) { - $GLOBALS['notification']->push($e->getMessage(), 'horde.error'); + $GLOBALS['notification']->push($e); return null; } } diff --git a/imp/lib/Mailbox.php b/imp/lib/Mailbox.php index 52682f6aa..bf2f10f53 100644 --- a/imp/lib/Mailbox.php +++ b/imp/lib/Mailbox.php @@ -679,7 +679,7 @@ class IMP_Mailbox try { $this->_threadob = $GLOBALS['imp_imap']->ob()->thread($this->_mailbox, array('criteria' => $_SESSION['imp']['imap']['thread'])); } catch (Horde_Imap_Client_Exception $e) { - $GLOBALS['notification']->push($e, 'horde.error'); + $GLOBALS['notification']->push($e); return new Horde_Imap_Client_Thread(array(), 'uid'); } } diff --git a/imp/message.php b/imp/message.php index 39acb7383..e1d527287 100644 --- a/imp/message.php +++ b/imp/message.php @@ -154,7 +154,7 @@ case 'add_address': $contact_link = IMP::addAddress($vars->address, $vars->name); $notification->push(sprintf(_("Entry \"%s\" was successfully added to the address book"), $contact_link), 'horde.success', array('content.raw')); } catch (Horde_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); } break; @@ -163,7 +163,7 @@ case 'strip_attachment': try { $imp_message->stripPart($indices_array, ($vars->actionID == 'strip_all') ? null : $vars->imapid); } catch (Horde_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); } break; } diff --git a/imp/pgp.php b/imp/pgp.php index 336bced34..3e40f1680 100644 --- a/imp/pgp.php +++ b/imp/pgp.php @@ -68,7 +68,7 @@ case 'process_import_public_key': $notification->push(_("No PGP public key imported."), 'horde.error'); throw new Horde_Exception_Prior($e); } catch (Horde_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); $actionID = 'import_public_key'; $imp_pgp->importKeyDialog('process_import_public_key', Horde_Util::getFormData('reload')); } @@ -108,7 +108,7 @@ case 'process_import_personal_public_key': $notification->push(_("No personal PGP public key imported."), 'horde.error'); throw new Horde_Exception_Prior($e); } catch (Horde_Exception $e) { - $notification->push($e->getMessage(), 'horde.error'); + $notification->push($e); $imp_pgp->importKeyDialog('process_import_personal_public_key', Horde_Util::getFormData('reload')); } exit; @@ -135,7 +135,7 @@ case 'process_import_personal_private_key': $notification->push(_("No personal PGP private key imported."), 'horde.error'); throw new Horde_Exception_Prior($e); } catch (Horde_Exception $e) { - $notification->push($e->getMessage(), 'horde.error'); + $notification->push($e); $imp_pgp->importKeyDialog('process_import_personal_private_key', Horde_Util::getFormData('reload')); } exit; diff --git a/imp/saveimage.php b/imp/saveimage.php index dc364fb68..8fc09a858 100644 --- a/imp/saveimage.php +++ b/imp/saveimage.php @@ -31,7 +31,7 @@ case 'save_image': try { $registry->call('images/saveImage', array(null, Horde_Util::getFormData('gallery'), $image_data)); } catch (Horde_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); break; } Horde_Util::closeWindowJS(); diff --git a/imp/smime.php b/imp/smime.php index 9e7be4907..a6a9129dc 100644 --- a/imp/smime.php +++ b/imp/smime.php @@ -50,7 +50,7 @@ case 'process_import_public_key': $notification->push(_("No S/MIME public key imported."), 'horde.error'); throw new Horde_Exception_Prior($e); } catch (Horde_Exception $e) { - $notification->push($e, 'horde.error'); + $notification->push($e); $actionID = 'import_public_key'; $imp_smime->importKeyDialog('process_import_public_key', Horde_Util::getFormData('reload')); }