Skip to content

Commit

Permalink
#125 check for post or pm flooding
Browse files Browse the repository at this point in the history
  • Loading branch information
burnacid committed Jan 1, 2020
1 parent 9cdccac commit d0f7c14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions form.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@

foreach ($group_members as $user) {
$pmhandler = new PMDataHandler();
$pmhandler->admin_override = true;

$pm = array(
"subject" => $subject,
Expand All @@ -258,6 +257,8 @@
"allow_html" => 1);

$pmhandler->set_data($pm);
$pmhandler->verify_pm_flooding();

if ($pmhandler->validate_pm()) {
$pmhandler->insert_pm();
} else {
Expand Down Expand Up @@ -314,7 +315,7 @@

$posthandler = new PostDataHandler();
$posthandler->action = "post";
$posthandler->admin_override = true;
$posthandler->admin_override = false;

$new_post = array(
"fid" => $thread['fid'],
Expand All @@ -334,6 +335,7 @@
"disablesmilies" => '0');

$posthandler->set_data($new_post);
$posthandler->verify_post_flooding();

if ($posthandler->validate_post()) {
$post_info = $posthandler->insert_post();
Expand Down Expand Up @@ -361,7 +363,6 @@

$posthandler = new PostDataHandler();
$posthandler->action = "thread";
$posthandler->admin_override = true;

if (empty($prefix)) {
$prefix = $formcreator->settings['prefix'];
Expand All @@ -385,6 +386,7 @@
"disablesmilies" => '0');

$posthandler->set_data($new_thread);
$posthandler->verify_post_flooding();

if ($posthandler->validate_thread()) {
$thread_info = $posthandler->insert_thread();
Expand Down

0 comments on commit d0f7c14

Please sign in to comment.