Prevents reports with too many characters
This commit is contained in:
parent
cb66e0c8c1
commit
bb0b7007fd
|
@ -1151,6 +1151,7 @@
|
||||||
$config['error']['nodelete'] = _('You didn\'t select anything to delete.');
|
$config['error']['nodelete'] = _('You didn\'t select anything to delete.');
|
||||||
$config['error']['nodeletethread'] = _('You are not allowed to delete threads.');
|
$config['error']['nodeletethread'] = _('You are not allowed to delete threads.');
|
||||||
$config['error']['noreport'] = _('You didn\'t select anything to report.');
|
$config['error']['noreport'] = _('You didn\'t select anything to report.');
|
||||||
|
$config['error']['invalidreport'] = _('The reason was too long.');
|
||||||
$config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
|
$config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
|
||||||
$config['error']['invalidpassword'] = _('Wrong password…');
|
$config['error']['invalidpassword'] = _('Wrong password…');
|
||||||
$config['error']['invalidimg'] = _('Invalid image.');
|
$config['error']['invalidimg'] = _('Invalid image.');
|
||||||
|
|
3
post.php
3
post.php
|
@ -319,6 +319,9 @@ function handle_report(){
|
||||||
if (empty($report))
|
if (empty($report))
|
||||||
error($config['error']['noreport']);
|
error($config['error']['noreport']);
|
||||||
|
|
||||||
|
if (strlen($report) > 30)
|
||||||
|
error($config['error']['invalidreport']);
|
||||||
|
|
||||||
if (count($report) > $config['report_limit'])
|
if (count($report) > $config['report_limit'])
|
||||||
error($config['error']['toomanyreports']);
|
error($config['error']['toomanyreports']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue