X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Flistcommands%2Fsetup.php;h=2337e97fc3923f2acdd4b916cb287925252532b6;hp=e055bf89cf56bda0cd03f03ffae1edad7b77e765;hb=15ac78fea238aa18aac22dca396055b742394f71;hpb=b1784aafb147cac4ae8f3d976b748fae5b7f6ece
diff --git a/plugins/listcommands/setup.php b/plugins/listcommands/setup.php
index e055bf89..2337e97f 100644
--- a/plugins/listcommands/setup.php
+++ b/plugins/listcommands/setup.php
@@ -21,8 +21,7 @@ function squirrelmail_plugin_init_listcommands () {
}
function plugin_listcommands_menu() {
- global $passed_id, $passed_ent_id, $color, $mailbox,
- $message, $compose_new_win;
+ global $passed_id, $passed_ent_id, $color, $mailbox, $message;
/**
* Array of commands we can deal with from the header. The Reply option
@@ -42,7 +41,8 @@ function plugin_listcommands_menu() {
/* I don't know this action... skip it */
if ( ( function_exists('array_key_exists') && /* PHP >= 4.1 */
!array_key_exists($cmd, $fieldsdescr) ) ||
- !key_exists($cmd, $fieldsdescr) /* PHP == 4.0.6 */
+ ( function_exists('key_exists') &&
+ !key_exists($cmd, $fieldsdescr) ) /* PHP == 4.0.6 */
) {
continue;
}
@@ -54,28 +54,21 @@ function plugin_listcommands_menu() {
if ($proto == 'mailto') {
if (($cmd == 'post') || ($cmd == 'owner')) {
- $url = 'compose.php?';
+ $url = 'src/compose.php?';
} else {
- $url = "../plugins/listcommands/mailout.php?action=$cmd&";
+ $url = "plugins/listcommands/mailout.php?action=$cmd&";
}
$url .= 'send_to=' . strtr($act,'?','&');
- if ($compose_new_win == '1') {
- $output[] = "" . $fieldsdescr[$cmd] . '';
- }
- else {
- $output[] = '' . $fieldsdescr[$cmd] . '';
- }
+ $output[] = makeComposeLink($url, $fieldsdescr[$cmd]);
+
if ($cmd == 'post') {
$url .= '&passed_id='.$passed_id.
'&mailbox='.urlencode($mailbox).
(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[] = makeComposeLink($url, $fieldsdescr['reply']);
}
} else if ($proto == 'href') {
$output[] = ''