Skip to content

Commit 2e1cb26

Browse files
committed
Fix antispam block for email sending
1 parent ac3db77 commit 2e1cb26

8 files changed

Lines changed: 16 additions & 11 deletions

File tree

conf/_application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Release date (ISO)
2222
* @global string
2323
*/
24-
$app_date = '2019-02-25';
24+
$app_date = '2019-02-26';
2525

2626
/**
2727
* Long version string for checking differences

htsrv/anon_unsubscribe.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
switch( $type )
3131
{
3232
case 'comment':
33+
// Unsubscribe anonymous user from notifications of replies on Items where the user posted a comment:
34+
35+
// Stop a request from the blocked IP addresses or Domains:
36+
antispam_block_request();
37+
3338
if( !is_email( $anon_email ) )
3439
{
3540
$Messages->add( 'Your email address is not correct. Probably the unsubscribe link was modified.' );

htsrv/login.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@
116116
case 'resetpassword':
117117
// Send password reset request by email:
118118

119+
// Stop a request from the blocked IP addresses or Domains
120+
antispam_block_request();
121+
119122
global $servertimenow;
120123
$login_required = true; // Do not display "Without login.." link on the form
121124

htsrv/message_send.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@
520520
'message' => $message,
521521
'contact_method' => $send_contact_method,
522522
'additional_fields' => $send_additional_fields,
523-
'comment_id' => $comment_id,
523+
'comment_ID' => $comment_id,
524524
'post_id' => $post_id,
525525
'recipient_User' => $recipient_User,
526526
'Comment' => $Comment,

inc/_core/_misc.funcs.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3797,9 +3797,6 @@ function send_mail( $to, $to_name, $subject, $message, $from = NULL, $from_name
37973797
global $mail_log_message;
37983798
$mail_log_message = NULL;
37993799

3800-
// Stop a request from the blocked IP addresses or Domains
3801-
antispam_block_request();
3802-
38033800
global $debug, $app_name, $app_version, $current_locale, $current_charset, $evo_charset, $locales, $Debuglog, $Settings, $demo_mode, $mail_log_insert_ID;
38043801

38053802
$message_data = $message;

inc/antispam/model/_antispam.funcs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ function antispam_block_by_domain()
653653
continue;
654654
}
655655

656-
// Get domain name by current IP adress:
656+
// Get domain name by current IP address:
657657
$ip_domain = gethostbyaddr( $ip_address );
658658

659659
if( ! empty( $ip_domain ) &&

skins_email/contact_message_new.html.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'message_footer' => '',
2424
'Blog' => NULL,
2525
'message' => '',
26-
'comment_id' => NULL,
26+
'comment_ID' => NULL,
2727
'post_id' => NULL,
2828
'recipient_User' => NULL,
2929
'Comment' => NULL,
@@ -36,10 +36,10 @@
3636
if( !empty( $Blog ) )
3737
{
3838
echo '<p'.emailskin_style( '.p' ).'>';
39-
if( !empty( $params['comment_id'] ) )
39+
if( !empty( $params['comment_ID'] ) )
4040
{ // From comment
4141
$CommentCache = & get_CommentCache();
42-
$Comment = & $CommentCache->get_by_ID( $params['comment_id'] );
42+
$Comment = & $CommentCache->get_by_ID( $params['comment_ID'] );
4343
$Item = & $Comment->get_Item();
4444
echo sprintf( T_('Message sent from your <a %s>comment</a> on %s.'),
4545
'href="'.$Comment->get_permanent_url( '&', '#comments' ).'"'.emailskin_style( '.a' ).'',

skins_email/contact_message_new.txt.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'message_footer' => '',
2525
'Blog' => NULL,
2626
'message' => '',
27-
'comment_id' => NULL,
27+
'comment_ID' => NULL,
2828
'post_id' => NULL,
2929
'recipient_User' => NULL,
3030
'Comment' => NULL,
@@ -74,7 +74,7 @@
7474
$CommentCache = & get_CommentCache();
7575
$ItemCache = & get_ItemCache();
7676

77-
if( !empty( $params['comment_id'] ) && ( $Comment = & $CommentCache->get_by_ID( $params['comment_id'], false, false ) ) )
77+
if( !empty( $params['comment_ID'] ) && ( $Comment = & $CommentCache->get_by_ID( $params['comment_ID'], false, false ) ) )
7878
{
7979
echo "\n\n".T_('Message sent from your comment:') . "\n"
8080
.$Comment->get_permanent_url();

0 commit comments

Comments
 (0)