X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Flistcommands%2Fsetup.php;h=bb7be7941b87068a2980aba88178a0a82d9a0873;hp=07e9f7040bd0504d8e7e5867ee4067b5bc3238fb;hb=6614128e580396f5e881fa058c1935b0ee2fc867;hpb=ff5d07191b97e40f412c228ec1fbeaf8136b06fd diff --git a/plugins/listcommands/setup.php b/plugins/listcommands/setup.php index 07e9f704..bb7be794 100644 --- a/plugins/listcommands/setup.php +++ b/plugins/listcommands/setup.php @@ -40,7 +40,12 @@ function plugin_listcommands_menu() { foreach ($message->rfc822_header->mlist as $cmd => $actions) { /* I don't know this action... skip it */ - if(!array_key_exists($cmd, $fieldsdescr)) { + /* grrr PHP keeps changing their syntax... */ + if( function_exists('array_key_exists') ) { + if(!array_key_exists($cmd, $fieldsdescr)) { + continue; + } + } elseif ( !key_exists($cmd, $fieldsdescr) ) { continue; } @@ -58,10 +63,10 @@ function plugin_listcommands_menu() { $url .= 'send_to=' . strtr($act,'?','&'); if ($compose_new_win == '1') { - $output[] = "" . $fieldsdescr[$cmd] . ''; + $output[] = "" . $fieldsdescr[$cmd] . ''; } else { - $output[] = '' . $fieldsdescr[$cmd] . ''; + $output[] = '' . $fieldsdescr[$cmd] . ''; } if ($cmd == 'post') { $url .= '&passed_id='.$passed_id. @@ -69,27 +74,24 @@ function plugin_listcommands_menu() { (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:''); $url .= '&action=reply'; if ($compose_new_win == '1') { - $output[] = "" . $fieldsdescr['reply'] . ''; - } - else { - $output[] = '' . $fieldsdescr['reply'] . ''; + $output[] = "" . $fieldsdescr['reply'] . ''; + } else { + $output[] = '' . $fieldsdescr['reply'] . ''; } } - } elseif ($proto == 'href') { - $output[] = '' - . $fieldsdescr[$cmd] . ''; + } else if ($proto == 'href') { + $output[] = '' + . $fieldsdescr[$cmd] . ''; } } if (count($output) > 0) { - echo ''. "\n"; echo ''; - echo html_tag( 'td', ''._("Mailing List").':  ', 'right', $color[0], 'valign="top" width="20%"') . "\n"; - echo html_tag( 'td', - '' . implode(' | ', $output) . '', 'left', $color[0], 'valign="top" width="80%"'); - echo "\n"; - echo '
'."\n"; + echo html_tag('td', '' . _("Mailing List") . ':  ', + 'right', '', 'valign="middle" width="20%"') . "\n"; + echo html_tag('td', '' . implode(' | ', $output) . '', + 'left', $color[0], 'valign="middle" width="80%"') . "\n"; + echo ''; } }