Skip to content

Commit

Permalink
Merge pull request #126 from burnacid/V2.6.5
Browse files Browse the repository at this point in the history
V2.6.5
  • Loading branch information
burnacid authored Jan 5, 2020
2 parents f6eb9bc + d0f7c14 commit 421f466
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 2 additions & 4 deletions admin/modules/config/formcreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,8 @@
$form_container->output_row($lang->fc_required, $lang->fc_field_required_desc, $form->generate_yes_no_radio("required", $field->required));
}
if ($field->show_admin_field("regex")) {
$form_container->output_row($lang->fc_regex, $lang->fc_field_regex_desc, "<strong>/ ".$form->generate_text_box("settings[regex]", $field->
regex)." /</strong>");
$form_container->output_row($lang->fc_regex_error, $lang->fc_field_regex_error_desc, $form->generate_text_box("settings[regexerror]", $field->
regexerror));
$form_container->output_row($lang->fc_regex, $lang->fc_field_regex_desc, "<strong>/ ".$form->generate_text_box("settings[regex]", $field->settings['regex'])." /</strong>");
$form_container->output_row($lang->fc_regex_error, $lang->fc_field_regex_error_desc, $form->generate_text_box("settings[regexerror]", $field->settings['regexerror']));
}
if ($field->show_admin_field("size")) {
$form_container->output_row($lang->fc_size, $lang->fc_field_size_desc, $form->generate_numeric_field("settings[size]", $field->settings['size']));
Expand Down
12 changes: 7 additions & 5 deletions form.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@

if ($field->settings['regex'] && !preg_match("/" . $field->settings['regex'] . "/", $mybb->input["field_" . $field->fieldid])) {
if (!empty($field->settings['regexerror'])) {

$error_array[] = $field->settings['regexerror'];
} else {
$error_array[] = $lang->fc_no_attachment;
$error_array[] = $lang->fc_no_match_regex;
}

}
Expand Down 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
2 changes: 1 addition & 1 deletion inc/plugins/formcreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function formcreator_info()
'website' => 'https://community.mybb.com/mods.php?action=view&pid=975',
'author' => 'S. Lenders (burnacid)',
'authorsite' => 'http://lenders-it.nl',
'version' => '2.6.4',
'version' => '2.6.5',
'compatibility' => '18*',
'codename' => 'formcreator');
}
Expand Down

0 comments on commit 421f466

Please sign in to comment.