浏览代码

Undo fix for PHP 4.0.4 since SquirrelMail doesn't work reliably with 4.0.4
anyway.

Thijs Kinkhorst 22 年之前
父节点
当前提交
bf6349bfbd
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      plugins/listcommands/setup.php

+ 4 - 2
plugins/listcommands/setup.php

@@ -40,8 +40,10 @@ function plugin_listcommands_menu() {
     foreach ($message->rfc822_header->mlist as $cmd => $actions) {
 
 	/* I don't know this action... skip it */
-        /* array_key_exists works only in >= 4.1 */
-        if ( !in_array($cmd, array_keys($fieldsdescr)) ) {
+	if ( ( function_exists('array_key_exists') &&       /* PHP >= 4.1 */
+               !array_key_exists($cmd, $fieldsdescr) ) ||
+             !key_exists($cmd, $fieldsdescr)                /* PHP == 4.0.6 */
+        ) {
             continue;
         }