Skip to content

Commit

Permalink
Fix sf bug 745715, thanks Peter for documenting this :)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiemccarthy committed Jun 3, 2003
1 parent 486f546 commit 4c87ab8
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions themes/slashcode/htdocs/comments.pl
Expand Up @@ -1006,10 +1006,6 @@ sub previewForm {
$sig = "--<BR>$sig";
}

my $subscriber_bonus = 0;
$subscriber_bonus = 1
if $user->{is_subscriber} && $form->{nosubscriberbonus} ne 'on';

my $preview = {
nickname => $form->{postanon}
? getCurrentAnonymousCoward('nickname')
Expand All @@ -1023,9 +1019,13 @@ sub previewForm {
subject => $tempSubject,
comment => $tempComment,
sig => $sig,
subscriber_bonus => $subscriber_bonus,
};

if ($constants->{plugin}{Subscribe}) {
$preview->{subscriber_bonus} = $user->{is_subscriber} && $form->{nosubscriberbonus} ne 'on'
? 1 : 0;
}

my $tm = $user->{mode};
$user->{mode} = 'archive';
my $previewForm;
Expand Down Expand Up @@ -1135,7 +1135,8 @@ sub submitComment {
$pts = $maxScore if $pts > $maxScore;
$karma_bonus = 1 if $pts >= 1 && $user->{karma} > $constants->{goodkarma}
&& !$form->{nobonus};
$subscriber_bonus = 1 if $user->{is_subscriber}
$subscriber_bonus = 1 if $constants->{plugin}{Subscribe}
&& $user->{is_subscriber}
&& $form->{nosubscriberbonus} ne 'on';
}
# This is here to prevent posting to discussions that don't exist/are nd -Brian
Expand All @@ -1160,8 +1161,10 @@ sub submitComment {
uid => $posters_uid,
points => $pts,
karma_bonus => $karma_bonus ? 'yes' : 'no',
subscriber_bonus => $subscriber_bonus ? 'yes' : 'no',
};
if ($constants->{plugin}{Subscribe}) {
$clean_comment->{subscriber_bonus} = $subscriber_bonus ? 'yes' : 'no';
}

my $maxCid = $slashdb->createComment($clean_comment);

Expand Down

0 comments on commit 4c87ab8

Please sign in to comment.