Skip to content

Commit

Permalink
Added check for double posts of comments
Browse files Browse the repository at this point in the history
  • Loading branch information
efiabruni committed Dec 7, 2013
1 parent ef0a118 commit 6442650
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pe_admin.pl
Expand Up @@ -553,7 +553,17 @@
}
else
{
if(length($content) > $config_commentsMaxLenght)#if comment is too long
#check if the comment already exists
my $check=$title.'"'.$author.'"'.$content;
my $old;
open (FILE, "<$config_commentsDatabaseFolder/$fileNum.$config_dbFilesExtension");
while (<FILE>){$old=$_;}
close FILE;
if ($old=~ /$check/){
print '<br />'.$locale{$lang}->{comtwice};
}

elsif (length($content) > $config_commentsMaxLenght)#if comment is too long
{
print '<br />'.$locale{$lang}->{toolong1}.$config_commentsMaxLenght.$locale{$lang}->{toolong2}.length($content);
}
Expand Down

0 comments on commit 6442650

Please sign in to comment.