From: Pierre Habouzit Date: Mon, 22 Sep 2003 16:28:38 +0000 (+0000) Subject: to_header_string was a bad idea... X-Git-Tag: procmail~12 X-Git-Url: http://git.polytechnique.org/?p=old-projects.git;a=commitdiff_plain;h=27c46cc101c9b69ebcb22ffd9696c4acc3eeeb8e to_header_string was a bad idea... --- diff --git a/philter/philter/include/plugin.inc.php b/philter/philter/include/plugin.inc.php index 851cce4..71894c3 100644 --- a/philter/philter/include/plugin.inc.php +++ b/philter/philter/include/plugin.inc.php @@ -54,8 +54,6 @@ class Plugin { */ function to_string($_data) { return ""; } - function to_header_string() { return ""; } - /** returns the function that creates the form in javascript (@see FwdPlugin for one example). * @return the string containing the javascript code */ diff --git a/philter/philter/include/plugin_autoreply.inc.php b/philter/philter/include/plugin_autoreply.inc.php index cc517e0..e068ce1 100644 --- a/philter/philter/include/plugin_autoreply.inc.php +++ b/philter/philter/include/plugin_autoreply.inc.php @@ -32,16 +32,13 @@ EOF; function to_string($_data) { $uid = get_user_id(); $text = explode("\n",$_data[1]); - $res = "| ( formail -rA'X-Philter-Autoreply: $uid; \ \n"; + $res = " :0 hc\n" + . " *X-Philter-Autoreply: $uid" + . " | ( formail -rA'X-Philter-Autoreply: $uid; \ \n"; foreach($text as $line) - $res .= " echo ".escapeshellarg($line)."; \ \n"; - $res .= " ) | $"."SENDMAIL -oi -t\n"; - } - - function to_header_string() { - return "* ^X-Philter-Autoreply:".get_user_id()."\n" - . "/dev/null\n" - . "\n"; + $res .= " echo ".escapeshellarg($line)."; \ \n"; + $res.= " ) | $"."SENDMAIL -oi -t\n"; + return $res; } } diff --git a/philter/philter/include/plugin_forward.inc.php b/philter/philter/include/plugin_forward.inc.php index 4e2c6a0..fb1d0d4 100644 --- a/philter/philter/include/plugin_forward.inc.php +++ b/philter/philter/include/plugin_forward.inc.php @@ -13,25 +13,30 @@ class FwdPlugin extends ActionPlugin { function name() { return _i18n('1_fwd_to'); } function to_js() { - $res = "function(Node, data) {\n" - . " var i,j;\n" - . " var sel = 0;\n" - . " var select = document.createElement('select');\n" - . " select.setAttribute('name', Node.name+'[1]');\n" - . " Node.appendChild(document.createTextNode(' '));\n" - . "\n" - // OG: must insert select node before creating options because of IE5 bug - . " Node.appendChild(select);\n" - . "\n" - . " for(i=0,j=0; iemails[$_data[1]]->email."\n"; } } diff --git a/philter/philter/include/plugin_header.inc.php b/philter/philter/include/plugin_header.inc.php index b9b8e56..fa26d49 100644 --- a/philter/philter/include/plugin_header.inc.php +++ b/philter/philter/include/plugin_header.inc.php @@ -13,8 +13,8 @@ class HdrPlugin extends MatchPlugin { function name() { return _i18n('2_hdr'); } function to_js() { - return -"function(Node, data) { + return <<