Skip to content

Commit

Permalink
Remove Fix "Read the rest of this comment..." logic #53
Browse files Browse the repository at this point in the history
  • Loading branch information
paulej72 committed May 24, 2015
1 parent dec64d2 commit 2876a07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Slash/DB/MySQL/MySQL.pm
Expand Up @@ -6392,10 +6392,10 @@ sub getCommentTextCached {
my $abbreviate = $abbreviate_ok && $comments->{$cid}{class} eq 'oneline';
my $original_text = $more_comment_text->{$cid};
my $this_max_len = $abbreviate ? $abbreviate_len : $max_len;
my $allowed_overrun = $abbreviate ? 256 : ($this_max_len * 0.20); #allow 256 char overrun for abbreviated mode or 20% for normal

if ( $possible_chop
&& !($opt->{cid} && $opt->{cid} eq $cid)
&& ($comments->{$cid}{len} > ($this_max_len + $allowed_overrun))
&& ($comments->{$cid}{len} > ($this_max_len + 256))
) {
# We remove the domain tags so that strip_html will not
# consider </a blah> to be a non-approved tag. We'll
Expand Down
5 changes: 2 additions & 3 deletions Slash/Utility/Comments/Comments.pm
Expand Up @@ -1874,14 +1874,13 @@ sub dispComment {
my $user = getCurrentUser();
my $form = getCurrentForm();
my $gSkin = getCurrentSkin();
my $maxcommentsize = $constants->{default_maxcommentsize};
my $allowed_overrun = $maxcommentsize * 0.20; #allow 20% overrun
my $maxcommentsize = $options->{maxcommentsize} || $constants->{default_maxcommentsize};

my $comment_shrunk;

if ($form->{mode} ne 'archive'
&& !defined($comment->{abbreviated})
&& $comment->{len} > ($maxcommentsize + $allowed_overrun) #check if comment length is past max size + overrun (trimming actually happens in MySQL.pm getCommentTextCached)
&& $comment->{len} > $maxcommentsize
&& $form->{cid} ne $comment->{cid})
{
$comment_shrunk = 1;
Expand Down

0 comments on commit 2876a07

Please sign in to comment.