[dev] [imp-patch] small change to error messages

Francois Marier francois at nit.ca
Thu Jul 29 12:09:05 PDT 2004


Here a small patch that makes some error messages in IMP slightly more
readable by adding a colon between the error messages of IMP and the
IMAP server.

Francois
-------------- next part --------------
diff -rpuN -X ../ignorelist ../build/imp/lib/Folder.php imp/lib/Folder.php
--- ../build/imp/lib/Folder.php	Thu Feb 26 16:45:54 2004
+++ imp/lib/Folder.php	Tue Jul 13 20:39:20 2004
@@ -366,7 +366,7 @@ class IMP_Folder {
 
         foreach ($folder_array as $folder) {
             if (!imap_deletemailbox($stream, $server . $folder)) {
-                $notification->push(sprintf(_("The folder '%s' was not deleted. This is what the server said"), IMP::displayFolder($folder)) .
+                $notification->push(sprintf(_("The folder '%s' was not deleted. This is what the server said: "), IMP::displayFolder($folder)) .
                                     ': ' . imap_last_error(), 'horde.error');
                 $return_value = false;
             } else {
@@ -425,7 +425,7 @@ class IMP_Folder {
 
         /* Attempt to create the mailbox */
         if (!imap_createmailbox($stream, IMP::serverString($folder))) {
-            $notification->push(sprintf(_("The folder \"%s\" was not created. This is what the server said"), IMP::displayFolder($folder)) .
+            $notification->push(sprintf(_("The folder \"%s\" was not created. This is what the server said: "), IMP::displayFolder($folder)) .
                             ': ' . imap_last_error(), 'horde.error');
             return false;
         }
@@ -535,7 +535,7 @@ class IMP_Folder {
 
                 $notification->push(sprintf(_("The folder \"%s\" was successfully renamed to \"%s\"."), IMP::displayFolder($name_old), IMP::displayFolder($name_new)), 'horde.success');
             } else {
-                $notification->push(sprintf(_("Renaming \"%s\" to \"%s\" failed. This is what the server said"), IMP::displayFolder($name_old), IMP::displayFolder($name_new)) . ': ' . imap_last_error(), 'horde.error');
+                $notification->push(sprintf(_("Renaming \"%s\" to \"%s\" failed. This is what the server said: "), IMP::displayFolder($name_old), IMP::displayFolder($name_new)) . ': ' . imap_last_error(), 'horde.error');
                 $success = false;
             }
         }
@@ -583,7 +583,7 @@ class IMP_Folder {
         foreach ($folder_array as $folder) {
             if ($folder != ' ') {
                 if (!imap_subscribe($stream, IMP::serverString($folder))) {
-                    $notification->push(sprintf(_("You were not subscribed to \"%s\". Here is what the server said"), IMP::displayFolder($folder)) . ': ' . imap_last_error(), 'horde.error');
+                    $notification->push(sprintf(_("You were not subscribed to \"%s\". Here is what the server said: "), IMP::displayFolder($folder)) . ': ' . imap_last_error(), 'horde.error');
                     $return_value = false;
                 } else {
                     $notification->push(sprintf(_("You were successfully subscribed to \"%s\""), IMP::displayFolder($folder)), 'horde.success');
@@ -634,7 +634,7 @@ class IMP_Folder {
         foreach ($folder_array as $folder) {
             if ($folder != ' ') {
                 if (!imap_unsubscribe($stream, IMP::serverString($folder))) {
-                    $notification->push(sprintf(_("You were not unsubscribed from \"%s\". Here is what the server said"), IMP::displayFolder($folder)) . ': ' . imap_last_error(), 'horde.error');
+                    $notification->push(sprintf(_("You were not unsubscribed from \"%s\". Here is what the server said: "), IMP::displayFolder($folder)) . ': ' . imap_last_error(), 'horde.error');
                     $return_value = false;
                 } else {
                     $notification->push(sprintf(_("You were successfully unsubscribed from \"%s\""), IMP::displayFolder($folder)), 'horde.success');


More information about the dev mailing list