XHTML fixes
[squirrelmail.git] / plugins / listcommands / setup.php
index 2337e97fc3923f2acdd4b916cb287925252532b6..68643796c220519c3e32a6201d8246672f94b4cc 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * setup.php
  *
- * Copyright (c) 1999-2003 The SquirrelMail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Implementation of RFC 2369 for SquirrelMail.
  * commands such as (un)subscribe, help and list archives.
  *
  * $Id$
+ * @package plugins
+ * @subpackage listcommands
  */
 
+/**
+ * Initialize the listcommands plugin
+ */
 function squirrelmail_plugin_init_listcommands () {
     global $squirrelmail_plugin_hooks;
 
@@ -39,11 +44,7 @@ function plugin_listcommands_menu() {
     foreach ($message->rfc822_header->mlist as $cmd => $actions) {
 
        /* I don't know this action... skip it */
-       if ( ( function_exists('array_key_exists') &&       /* PHP >= 4.1 */
-               !array_key_exists($cmd, $fieldsdescr) ) ||
-             ( function_exists('key_exists') && 
-               !key_exists($cmd, $fieldsdescr) )            /* PHP == 4.0.6 */
-        ) {
+       if ( !array_key_exists($cmd, $fieldsdescr) ) {
             continue;
         }
 
@@ -63,10 +64,12 @@ function plugin_listcommands_menu() {
             $output[] = makeComposeLink($url, $fieldsdescr[$cmd]);
 
             if ($cmd == 'post') {
+                if (!isset($mailbox))
+                    $mailbox = 'INBOX';
                $url .= '&passed_id='.$passed_id.
                        '&mailbox='.urlencode($mailbox).
                        (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:'');
-                $url .= '&action=reply';
+                $url .= '&smaction=reply';
 
                 $output[] = makeComposeLink($url, $fieldsdescr['reply']);
             }