[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] CVS: squirrelmail/src read_body.php,1.335,1.336
From: Thijs Kinkhorst <kink () users ! sourceforge ! net>
Date: 2004-05-24 19:55:40
Message-ID: E1BSLXw-00019l-Np () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/squirrelmail/squirrelmail/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4281/src
Modified Files:
read_body.php
Log Message:
Replace array_search that only uses a boolean to check whether the value
exists with in_array (which returns just that boolean), and fix the
left over call to array_search to also check for NULL return.
This should fix the problems that Fredrik, me and other PHP 4.1 users
had with Marc's recent changes.
From PHP docs:
"Note: Prior to PHP 4.2.0, array_search() returns NULL on failure instead of FALSE."
Index: read_body.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/read_body.php,v
retrieving revision 1.335
retrieving revision 1.336
diff -u -w -r1.335 -r1.336
--- read_body.php 24 May 2004 15:17:06 -0000 1.335
+++ read_body.php 24 May 2004 19:55:21 -0000 1.336
@@ -119,10 +119,8 @@
function ServerMDNSupport($aFlags) {
/* escaping $ doesn't work -> \x36 */
- return (array_search('$mdnsent',$aFlags,true) !== false ||
- array_search('\\*',$aFlags,true) !== false) ? true : false;
- //$ret = preg_match('/(\x36MDNSent|\\\\\*)/i', $read);
- //return $ret;
+ return ( in_array('$mdnsent',$aFlags,true) ||
+ in_array('\\*',$aFlags,true) ) ;
}
function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
@@ -548,7 +546,7 @@
// Only bother with Delete & Prev and Delete & Next IF
// top display is enabled.
if ( $delete_prev_next_display == 1 &&
- array_search('\\deleted', $mbx_response['PERMANENTFLAGS'],true) !== false) {
+ in_array('\\deleted', $mbx_response['PERMANENTFLAGS'],true) ) {
$del_prev_link = _("Delete & Prev");
if ($prev >= 0) {
$uri = $base_uri . 'src/read_body.php?passed_id='.$prev.
@@ -634,7 +632,7 @@
$menu_row .= '</form> ';
- if (array_search('\\deleted', $mbx_response['PERMANENTFLAGS'],true) !== false) {
+ if ( in_array('\\deleted', $mbx_response['PERMANENTFLAGS'],true) ) {
// Form for deletion
$delete_url = $base_uri . 'src/delete_message.php?mailbox=' . $urlMailbox;
$menu_row .= '<form action="'.$delete_url.'" method="post" style="display: inline">';
@@ -661,7 +659,7 @@
// Add top move link
$menu_row .= '</small></td><td align="right">';
if ( !(isset($passed_ent_id) && $passed_ent_id) &&
- array_search('\\deleted', $mbx_response['PERMANENTFLAGS'],true) !== false) {
+ in_array('\\deleted', $mbx_response['PERMANENTFLAGS'],true) ) {
$current_box = 'mailbox='.$mailbox.'&sort='.$sort.'&startMessage='.$startMessage;
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
--
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