Make listcommands work with php 4.0.4 and 4.0.5. Thanks Oyku Gencay.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Feb 2003 11:34:13 +0000 (11:34 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Feb 2003 11:34:13 +0000 (11:34 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4554 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
plugins/listcommands/setup.php

index f2bc009988834584b81d1d8d9ada6a4d7cdfc39e..e4d87f85632d802e35b007a07c1e99a0001c7a51 100644 (file)
--- 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
 -------------------
index f61d26d59954a1347a2a20c9b8151e22375f458e..b432ced4f4c3e4159ebd980415b86e40949baf8c 100644 (file)
@@ -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;
         }