Zeile 54 | Zeile 54 |
---|
if($mybb->get_input('regex', MyBB::INPUT_INT)) { // Check validity of defined regular expression
|
if($mybb->get_input('regex', MyBB::INPUT_INT)) { // Check validity of defined regular expression
|
if((@preg_match('#'.$badword.'#is', null) === false))
| if((@preg_match('#'.$badword.'#is', '') === false))
|
{ $errors[] = $lang->error_invalid_regex; }
| { $errors[] = $lang->error_invalid_regex; }
|
Zeile 203 | Zeile 203 |
---|
if(strlen($mybb->input['replacement']) > 100) { $errors[] = $lang->replacement_word_max;
|
if(strlen($mybb->input['replacement']) > 100) { $errors[] = $lang->replacement_word_max;
|
| }
if(!$errors) { $query = $db->simple_select("badwords", "bid", "badword = '".$db->escape_string($mybb->input['badword'])."' AND bid != '".$badword['bid']."'");
if($db->num_rows($query)) { $errors[] = $lang->error_bad_word_filtered; } }
$badword_check = trim($mybb->input['badword']);
if($mybb->get_input('regex', MyBB::INPUT_INT)) { // Check validity of defined regular expression if((@preg_match('#'.$badword_check.'#is', '') === false)) { $errors[] = $lang->error_invalid_regex; } } else { if(!isset($parser) || !is_object($parser)) { require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser; }
$badword_check = $parser->generate_regex($badword_check); }
// Don't allow certain badword replacements to be added if it would cause an infinite recursive loop. if(@preg_match('#'.$badword_check.'#is', $mybb->input['replacement'])) { $errors[] = $lang->error_replacement_word_invalid;
|
}
if(!$errors)
| }
if(!$errors)
|