X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Flistcommands%2Ffunctions.php;h=6c526c2a49ff4e72a6aa03293cb85ca8dea6bd07;hb=d47243ef228a893fda11d5b8d7169a15cb21c333;hp=cc6aa1e3955e2d245bcf3ab4580933b7a1a11e7c;hpb=79ba18dc89b1b096ecdf0b77169d57e0caf661db;p=squirrelmail.git diff --git a/plugins/listcommands/functions.php b/plugins/listcommands/functions.php index cc6aa1e3..6c526c2a 100644 --- a/plugins/listcommands/functions.php +++ b/plugins/listcommands/functions.php @@ -8,7 +8,7 @@ * this plugin displays a menu which gives the user a choice of mailinglist * commands such as (un)subscribe, help and list archives. * - * @copyright 1999-2013 The SquirrelMail Project Team + * @copyright 1999-2015 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins @@ -84,6 +84,7 @@ function plugin_listcommands_menu_do() { /* proto = {mailto,href} */ $aActions = array_keys($actions); + // note that we only use the first cmd/action, ignore the rest $proto = array_shift($aActions); $act = array_shift($actions); @@ -95,7 +96,17 @@ function plugin_listcommands_menu_do() { } else { $url = "plugins/listcommands/mailout.php?action=$cmd&"; } - $url .= 'send_to=' . str_replace('?','&', $act); + + // if things like subject are given, peel them off and give + // them to src/compose.php as is (not encoded) + if (strpos($act, '?') > 0) { + list($act, $parameters) = explode('?', $act, 2); + $parameters = '&' . $parameters; + } else { + $parameters = ''; + } + + $url .= 'send_to=' . urlencode($act) . $parameters; $links[$cmd] = makeComposeLink($url, $fieldsdescr[$cmd]);