From 782d8593bd8cc511483e959519f84a389aee131f Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 14 Aug 2011 14:54:24 -0400
Subject: [PATCH] More unique error codes

---
 program/include/main.inc        |    4 ++--
 program/include/rcmail.php      |    8 ++++----
 program/steps/mail/func.inc     |    2 +-
 program/steps/mail/sendmail.inc |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/program/include/main.inc b/program/include/main.inc
index a9ab55a..d43f8ea 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1693,7 +1693,7 @@
       $temp_dir = $RCMAIL->config->get('temp_dir');
       $body_file = tempnam($temp_dir, 'rcmMsg');
       if (PEAR::isError($mime_result = $message->saveMessageBody($body_file))) {
-        raise_error(array('code' => 600, 'type' => 'php',
+        raise_error(array('code' => 650, 'type' => 'php',
             'file' => __FILE__, 'line' => __LINE__,
             'message' => "Could not create message: ".$mime_result->getMessage()),
             TRUE, FALSE);
@@ -1738,7 +1738,7 @@
     $msg_body = $message->get();
 
     if (PEAR::isError($msg_body))
-      raise_error(array('code' => 600, 'type' => 'php',
+      raise_error(array('code' => 650, 'type' => 'php',
             'file' => __FILE__, 'line' => __LINE__,
             'message' => "Could not create message: ".$msg_body->getMessage()),
             TRUE, FALSE);
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index d38f771..ced5934 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -421,7 +421,7 @@
 
     if (!$contacts) {
       raise_error(array(
-        'code' => 600, 'type' => 'php',
+        'code' => 700, 'type' => 'php',
         'file' => __FILE__, 'line' => __LINE__,
         'message' => "Addressbook source ($id) not found!"),
         true, true);
@@ -835,7 +835,7 @@
       }
       else {
         raise_error(array(
-          'code' => 600, 'type' => 'php',
+          'code' => 620, 'type' => 'php',
           'file' => __FILE__, 'line' => __LINE__,
           'message' => "Failed to create a user record. Maybe aborted by a plugin?"
           ), true, false);
@@ -843,9 +843,9 @@
     }
     else {
       raise_error(array(
-        'code' => 600, 'type' => 'php',
+        'code' => 621, 'type' => 'php',
         'file' => __FILE__, 'line' => __LINE__,
-        'message' => "Acces denied for new user $username. 'auto_create_user' is disabled"
+        'message' => "Access denied for new user $username. 'auto_create_user' is disabled"
         ), true, false);
     }
 
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index ff9a60c..b04628f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -586,7 +586,7 @@
     if ($preg_error == PREG_RECURSION_LIMIT_ERROR)
       $errstr .= " Consider raising pcre.recursion_limit!";
 
-    raise_error(array('code' => 600, 'type' => 'php',
+    raise_error(array('code' => 620, 'type' => 'php',
         'line' => __LINE__, 'file' => __FILE__,
         'message' => $errstr), true, false);
     return '';
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 0b6f49f..aee4982 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -674,7 +674,7 @@
       }
 
     if (PEAR::isError($msg))
-      raise_error(array('code' => 600, 'type' => 'php',
+      raise_error(array('code' => 650, 'type' => 'php',
 	    'file' => __FILE__, 'line' => __LINE__,
             'message' => "Could not create message: ".$msg->getMessage()),
             TRUE, FALSE);

--
Gitblit v1.9.1