From 53b3a6f0d7497cced2a260711e4aa433f6b034e1 Mon Sep 17 00:00:00 2001 From: kink Date: Wed, 26 Feb 2003 11:34:13 +0000 Subject: [PATCH] Make listcommands work with php 4.0.4 and 4.0.5. Thanks Oyku Gencay. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4554 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 3 ++- plugins/listcommands/setup.php | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2bc0099..e4d87f85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,7 +26,8 @@ Version 1.4.0 CVS - Fixed encoding of email addresses in our composed messages. - Fixed folder creation for Courier using Autoconfig options. - Fixed encoded string handling inside MDN notifications - - Fixed unfold header routine in imap_messages (for mailbox_display) + - Fixed unfold header routine in imap_messages (for mailbox_display). + - Make listcommands work with PHP versions 4.0.4 & 4.0.5. Version 1.4.0 RC 2a ------------------- diff --git a/plugins/listcommands/setup.php b/plugins/listcommands/setup.php index f61d26d5..b432ced4 100644 --- a/plugins/listcommands/setup.php +++ b/plugins/listcommands/setup.php @@ -40,12 +40,8 @@ function plugin_listcommands_menu() { foreach ($message->rfc822_header->mlist as $cmd => $actions) { /* I don't know this action... skip it */ - /* grrr PHP keeps changing their syntax... */ - if( function_exists('array_key_exists') ) { - if(!array_key_exists($cmd, $fieldsdescr)) { - continue; - } - } elseif ( !key_exists($cmd, $fieldsdescr) ) { + /* array_key_exists works only in >= 4.1 */ + if ( !in_array($cmd, array_keys($fieldsdescr)) ) { continue; } -- 2.25.1