X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fspamcop%2Ffunctions.php;h=d53f299b6148ff2a88e41a52e407517838f2195d;hp=a36ac3ceed0575143ef9002b5ff704f3184ab440;hb=7dc06407b2f39bd3b18495185a9f3c05f6c3ae0c;hpb=8b393e799a4c8e90642b5558fb3af45d4a5e6d45 diff --git a/plugins/spamcop/functions.php b/plugins/spamcop/functions.php index a36ac3ce..d53f299b 100644 --- a/plugins/spamcop/functions.php +++ b/plugins/spamcop/functions.php @@ -59,7 +59,7 @@ function spamcop_load_function() { * @since 1.5.1 * @access private */ -function spamcop_show_link_function() { +function spamcop_show_link_function(&$links) { global $spamcop_enabled, $spamcop_method, $spamcop_quick_report,$javascript_on; if (! $spamcop_enabled) @@ -79,8 +79,6 @@ function spamcop_show_link_function() { $passed_ent_id = 0; } - echo "
\n"; - /* Catch situation when user uses quick_email and does not update preferences. User gets web_form link. If prefs are set to @@ -90,19 +88,24 @@ function spamcop_show_link_function() { $spamcop_method = 'web_form'; } - // Javascript is used only in web based reporting - // don't insert javascript if javascript is disabled - if ($spamcop_method == 'web_form' && $javascript_on) { -?> - - +// document.write(''); +//document.write(""); +//document.write(""); +// + + + $url = '../plugins/spamcop/spamcop.php?passed_id=' . urlencode($passed_id) . + '&mailbox=' . urlencode($mailbox) . '&startMessage=' . urlencode($startMessage) . + '&passed_ent_id=' . urlencode($passed_ent_id); + if ( $spamcop_method == 'web_form' && $javascript_on ) { + $url .= '&js_web=1'; } + + $links[] = array ( 'URL' => $url, + 'Text' => _("Report as Spam") + ); } /**