From: Jan Schneider Date: Sun, 14 Feb 2010 22:39:10 +0000 (+0100) Subject: Fix Exception calling. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=17dbed78822f3756448e89d6cfc1193bdd5ac2c7;p=horde.git Fix Exception calling. --- diff --git a/framework/Block/lib/Horde/Block/Layout/Manager.php b/framework/Block/lib/Horde/Block/Layout/Manager.php index b1d9c6de6..3732f9de6 100644 --- a/framework/Block/lib/Horde/Block/Layout/Manager.php +++ b/framework/Block/lib/Horde/Block/Layout/Manager.php @@ -869,7 +869,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout return; } // Nowhere to go. - throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first'); } } @@ -933,7 +933,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout return; } // No where to go - throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first'); } } } else { @@ -1026,7 +1026,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout return; } // No where to go - throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first'); } } @@ -1093,7 +1093,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout return; } // No where to go - throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first'); } } } else { @@ -1162,7 +1162,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout for ($i = 0; $i < $width; $i++) { if (!$this->isEmpty($row - 1, $col + $i)) { if (!$this->moveDownBelow($row - 1)) { - throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first'); } else { $row++; } @@ -1204,7 +1204,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout for ($i = 0; $i < $width; $i++) { if (!$this->isEmpty($lastrow + 1, $col + $i)) { if (!$this->moveDownBelow($lastrow)) { - throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first'); } } } @@ -1235,7 +1235,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout for ($i = 0; $i < $height; $i++) { if (!$this->isEmpty($row + $i, $col - 1)) { if (!$this->moveRightAfter($col - 1)) { - throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first'); } else { $col++; } @@ -1270,7 +1270,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout for ($i = 0; $i < $height; $i++) { if (!$this->isEmpty($row + $i, $lastcol + 1)) { if (!$this->moveRightAfter($lastcol)) { - throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first', 'horde.warning'); + throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first'); } } } diff --git a/framework/Crypt/lib/Horde/Crypt/Pgp.php b/framework/Crypt/lib/Horde/Crypt/Pgp.php index b4ab9a59a..03fd21a1b 100644 --- a/framework/Crypt/lib/Horde/Crypt/Pgp.php +++ b/framework/Crypt/lib/Horde/Crypt/Pgp.php @@ -767,7 +767,7 @@ class Horde_Crypt_Pgp extends Horde_Crypt try { $this->getPublicKeyserver($info['keyid'], $server, $timeout); } catch (Horde_Exception $e) { - throw new Horde_Exception(_("Key already exists on the public keyserver."), 'horde.warning'); + throw new Horde_Exception(_("Key already exists on the public keyserver.")); } /* Connect to the public keyserver. _connectKeyserver() */ diff --git a/framework/Crypt/lib/Horde/Crypt/Smime.php b/framework/Crypt/lib/Horde/Crypt/Smime.php index dd6e6802d..bf9794930 100644 --- a/framework/Crypt/lib/Horde/Crypt/Smime.php +++ b/framework/Crypt/lib/Horde/Crypt/Smime.php @@ -194,7 +194,7 @@ class Horde_Crypt_Smime extends Horde_Crypt $result = openssl_pkcs7_verify($input, PKCS7_NOVERIFY, $output); if ($result === true) { - throw new Horde_Exception(_("Message Verified Successfully but the signer's certificate could not be verified."), 'horde.warning'); + throw new Horde_Exception(_("Message Verified Successfully but the signer's certificate could not be verified.")); } elseif ($result == -1) { throw new Horde_Exception(_("Verification failed - an unknown error has occurred.")); } else { diff --git a/imp/config/hooks.php.dist b/imp/config/hooks.php.dist index 02146e24c..4170eda75 100644 --- a/imp/config/hooks.php.dist +++ b/imp/config/hooks.php.dist @@ -560,11 +560,11 @@ class IMP_Hooks // // $session = ssh2_connect($host); // if (!$session) { -// throw new IMP_Exception(_("Connection to server failed."), 'horde.error'); +// throw new IMP_Exception(_("Connection to server failed.")); // } // // if (!ssh2_auth_password($session, $user, $pass)) { -// throw new IMP_Exception(_("Authentication failed."), 'horde.error'); +// throw new IMP_Exception(_("Authentication failed.")); // } // // $stream = ssh2_exec($session, $command, false); diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 3ed84f8d7..c2fa9e5ad 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -1172,7 +1172,7 @@ class IMP_Compose /* Check to see if we have the user's passphrase yet. */ $passphrase = $imp_pgp->getPassphrase('personal'); if (empty($passphrase)) { - $e = new IMP_Compose_Exception(_("PGP: Need passphrase for personal private key."), 'horde.message'); + $e = new IMP_Compose_Exception(_("PGP: Need passphrase for personal private key.")); $e->encrypt = 'pgp_passphrase_dialog'; throw $e; } @@ -1184,7 +1184,7 @@ class IMP_Compose * yet. */ $symmetric_passphrase = $imp_pgp->getPassphrase('symmetric', 'imp_compose_' . $this->_cacheid); if (empty($symmetric_passphrase)) { - $e = new IMP_Compose_Exception(_("PGP: Need passphrase to encrypt your message with."), 'horde.message'); + $e = new IMP_Compose_Exception(_("PGP: Need passphrase to encrypt your message with.")); $e->encrypt = 'pgp_symmetric_passphrase_dialog'; throw $e; } @@ -1225,7 +1225,7 @@ class IMP_Compose if (in_array($encrypt, array(IMP::SMIME_SIGN, IMP::SMIME_SIGNENC))) { $passphrase = $imp_smime->getPassphrase(); if ($passphrase === false) { - $e = new IMP_Compose_Exception(_("S/MIME Error: Need passphrase for personal private key."), 'horde.error'); + $e = new IMP_Compose_Exception(_("S/MIME Error: Need passphrase for personal private key.")); $e->encrypt = 'smime_passphrase_dialog'; throw $e; } @@ -1744,7 +1744,7 @@ class IMP_Compose /* Check for filesize limitations. */ if (!empty($conf['compose']['attach_size_limit']) && (($conf['compose']['attach_size_limit'] - $this->sizeOfAttachments() - $_FILES[$name]['size']) < 0)) { - throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $filename), 'horde.error'); + throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $filename)); } /* Determine the MIME type of the data. */ @@ -1778,7 +1778,7 @@ class IMP_Compose } else { $attachment = Horde::getTempFile('impatt', false); if (move_uploaded_file($tempfile, $attachment) === false) { - throw new IMP_Compose_Exception(sprintf(_("The file %s could not be attached."), $filename), 'horde.error'); + throw new IMP_Compose_Exception(sprintf(_("The file %s could not be attached."), $filename)); } } @@ -1822,7 +1822,7 @@ class IMP_Compose $attachment = Horde::getTempFile('impatt', false); $res = file_put_contents($attachment, $part->getContents()); if ($res === false) { - throw new IMP_Compose_Exception(sprintf(_("Could not attach %s to the message."), $part->getName()), 'horde.error'); + throw new IMP_Compose_Exception(sprintf(_("Could not attach %s to the message."), $part->getName())); } if (($type == 'application/octet-stream') && @@ -1842,7 +1842,7 @@ class IMP_Compose /* Check for filesize limitations. */ if (!empty($conf['compose']['attach_size_limit']) && (($conf['compose']['attach_size_limit'] - $this->sizeOfAttachments() - $bytes) < 0)) { - throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $part->getName()), 'horde.error'); + throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $part->getName())); } /* Store the data. */ diff --git a/imp/lib/Imap/Tree.php b/imp/lib/Imap/Tree.php index efa60c96c..8f8953807 100644 --- a/imp/lib/Imap/Tree.php +++ b/imp/lib/Imap/Tree.php @@ -2038,7 +2038,7 @@ class IMP_Imap_Tree return $new; } } - throw new Horde_Exception(_("Cannot directly create mailbox in this folder."), 'horde.error'); + throw new Horde_Exception(_("Cannot directly create mailbox in this folder.")); } $mbox = $ns_info['name']; diff --git a/imp/lib/Quota/Command.php b/imp/lib/Quota/Command.php index fec3d7183..6cbeee887 100644 --- a/imp/lib/Quota/Command.php +++ b/imp/lib/Quota/Command.php @@ -88,7 +88,7 @@ class IMP_Quota_Command extends IMP_Quota 'limit' => $quota[2] * $blocksize); } - throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error'); + throw new Horde_Exception(_("Unable to retrieve quota")); } } diff --git a/imp/lib/Quota/Hook.php b/imp/lib/Quota/Hook.php index e1976f777..7d62a9c48 100644 --- a/imp/lib/Quota/Hook.php +++ b/imp/lib/Quota/Hook.php @@ -37,7 +37,7 @@ class IMP_Quota_Hook extends IMP_Quota if (count($quota) != 2) { Horde::logMessage('Incorrect number of return values from quota hook.', __FILE__, __LINE__, PEAR_LOG_ERR); - throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error'); + throw new Horde_Exception(_("Unable to retrieve quota")); } return array('usage' => $quota[0], 'limit' => $quota[1]); diff --git a/imp/lib/Quota/Imap.php b/imp/lib/Quota/Imap.php index ad5c1571f..e5f5c739d 100644 --- a/imp/lib/Quota/Imap.php +++ b/imp/lib/Quota/Imap.php @@ -28,7 +28,7 @@ class IMP_Quota_Imap extends IMP_Quota try { $quota = $GLOBALS['imp_imap']->ob()->getQuotaRoot($GLOBALS['imp_search']->isSearchMbox($GLOBALS['imp_mbox']['mailbox']) ? 'INBOX' : $GLOBALS['imp_mbox']['mailbox']); } catch (Horde_Imap_Client_Exception $e) { - throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error'); + throw new Horde_Exception(_("Unable to retrieve quota")); } if (empty($quota)) { diff --git a/imp/lib/Quota/Mdaemon.php b/imp/lib/Quota/Mdaemon.php index 30c9dd5f2..9ce8adb59 100644 --- a/imp/lib/Quota/Mdaemon.php +++ b/imp/lib/Quota/Mdaemon.php @@ -43,7 +43,7 @@ class IMP_Quota_Mdaemon extends IMP_Quota } } - throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error'); + throw new Horde_Exception(_("Unable to retrieve quota")); } /** diff --git a/imp/lib/Quota/Mercury32.php b/imp/lib/Quota/Mercury32.php index 4a4cc99a2..c6738a535 100644 --- a/imp/lib/Quota/Mercury32.php +++ b/imp/lib/Quota/Mercury32.php @@ -59,7 +59,7 @@ class IMP_Quota_Mercury32 extends IMP_Quota } } - throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error'); + throw new Horde_Exception(_("Unable to retrieve quota")); } }