[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] CVS: squirrelmail/functions imap_messages.php, 1.209, 1.210
From: Paul Lesneiwski <pdontthink () users ! sourceforge ! net>
Date: 2006-11-11 19:49:22
Message-ID: E1Giyqw-0004Hw-Ff () sc8-pr-cvs8 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16471/functions
Modified Files:
imap_messages.php
Log Message:
Add ability to return error string as well. Would be nice if we had an error code \
system too.....
Index: imap_messages.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_messages.php,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -w -r1.209 -r1.210
--- imap_messages.php 11 Nov 2006 10:34:22 -0000 1.209
+++ imap_messages.php 11 Nov 2006 19:49:19 -0000 1.210
@@ -912,8 +912,8 @@
* @param resource $imap_stream imap connection
* @param integer $id uid of the message
* @param string $mailbox used for error handling, can be removed because we \
should return an error code and generate the message elsewhere
- * @param int $hide Indicates whether or not to hide any errors: 0 = don't \
hide, 1 = hide (just exit), 2 = hide (return FALSE) (OPTIONAL; \
default don't hide)
- * @return mixed Message object or FALSE if error occurred and $hide is set to 2
+ * @param int $hide Indicates whether or not to hide any errors: 0 = don't \
hide, 1 = hide (just exit), 2 = hide (return FALSE), 3 = hide (return error string) \
(OPTIONAL; default don't hide) + * @return mixed Message object or FALSE/error \
string if error occurred and $hide is set to 2/3
*/
function sqimap_get_message($imap_stream, $id, $mailbox, $hide=0) {
// typecast to int to prohibit 1:* msgs sets
@@ -934,8 +934,12 @@
/* the message was not found, maybe the mailbox was modified? */
global $sort, $startMessage, $color;
- $errmessage = _("The server couldn't find the message you requested.") .
- '<p>'._("Most probably your message list was out of date and the message \
has been moved away or deleted (perhaps by another program accessing the same \
mailbox)."); + $errmessage = _("The server couldn't find the message you \
requested."); +
+ if ($hide == 3) return $errmessage;
+
+ $errmessage .= '<p>'._("Most probably your message list was out of date and \
the message has been moved away or deleted (perhaps by another program accessing the \
same mailbox)."); +
/* this will include a link back to the message list */
error_message($errmessage, $mailbox, $sort, (int) $startMessage, $color);
exit;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic