Zeile 59 | Zeile 59 |
---|
{ $new_badword = array( "badword" => $db->escape_string($mybb->input['badword']),
|
{ $new_badword = array( "badword" => $db->escape_string($mybb->input['badword']),
|
| "regex" => $mybb->get_input('regex', MyBB::INPUT_INT),
|
"replacement" => $db->escape_string($mybb->input['replacement']) );
| "replacement" => $db->escape_string($mybb->input['replacement']) );
|
Zeile 81 | Zeile 82 |
---|
if($mybb->input['action'] == "delete") {
|
if($mybb->input['action'] == "delete") {
|
$query = $db->simple_select("badwords", "*", "bid='".$mybb->get_input('bid', 1)."'");
| $query = $db->simple_select("badwords", "*", "bid='".$mybb->get_input('bid', MyBB::INPUT_INT)."'");
|
$badword = $db->fetch_array($query);
// Does the bad word not exist?
| $badword = $db->fetch_array($query);
// Does the bad word not exist?
|
Zeile 122 | Zeile 123 |
---|
if($mybb->input['action'] == "edit") {
|
if($mybb->input['action'] == "edit") {
|
$query = $db->simple_select("badwords", "*", "bid='".$mybb->get_input('bid', 1)."'");
| $query = $db->simple_select("badwords", "*", "bid='".$mybb->get_input('bid', MyBB::INPUT_INT)."'");
|
$badword = $db->fetch_array($query);
// Does the bad word not exist?
| $badword = $db->fetch_array($query);
// Does the bad word not exist?
|
Zeile 155 | Zeile 156 |
---|
{ $updated_badword = array( "badword" => $db->escape_string($mybb->input['badword']),
|
{ $updated_badword = array( "badword" => $db->escape_string($mybb->input['badword']),
|
| "regex" => $mybb->get_input('regex', MyBB::INPUT_INT),
|
"replacement" => $db->escape_string($mybb->input['replacement']) );
| "replacement" => $db->escape_string($mybb->input['replacement']) );
|
Zeile 198 | Zeile 200 |
---|
$form_container = new FormContainer($lang->edit_bad_word); $form_container->output_row($lang->bad_word." <em>*</em>", $lang->bad_word_desc, $form->generate_text_box('badword', $badword_data['badword'], array('id' => 'badword')), 'badword'); $form_container->output_row($lang->replacement, $lang->replacement_desc, $form->generate_text_box('replacement', $badword_data['replacement'], array('id' => 'replacement')), 'replacement');
|
$form_container = new FormContainer($lang->edit_bad_word); $form_container->output_row($lang->bad_word." <em>*</em>", $lang->bad_word_desc, $form->generate_text_box('badword', $badword_data['badword'], array('id' => 'badword')), 'badword'); $form_container->output_row($lang->replacement, $lang->replacement_desc, $form->generate_text_box('replacement', $badword_data['replacement'], array('id' => 'replacement')), 'replacement');
|
| $form_container->output_row($lang->regex, $lang->regex_desc, $form->generate_yes_no_radio('regex', (int)$badword_data['regex'], array('id' => 'regex')), 'regex');
|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_bad_word); $form->output_submit_wrapper($buttons);
| $form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_bad_word); $form->output_submit_wrapper($buttons);
|
Zeile 228 | Zeile 231 |
---|
$table = new Table; $table->construct_header($lang->bad_word); $table->construct_header($lang->replacement, array("width" => "50%"));
|
$table = new Table; $table->construct_header($lang->bad_word); $table->construct_header($lang->replacement, array("width" => "50%"));
|
| $table->construct_header($lang->regex, array("class" => "align_center", "width" => "20%"));
|
$table->construct_header($lang->controls, array("class" => "align_center", "width" => 150, "colspan" => 2));
$query = $db->simple_select("badwords", "*", "", array("order_by" => "badword", "order_dir" => "asc"));
| $table->construct_header($lang->controls, array("class" => "align_center", "width" => 150, "colspan" => 2));
$query = $db->simple_select("badwords", "*", "", array("order_by" => "badword", "order_dir" => "asc"));
|
Zeile 239 | Zeile 243 |
---|
{ $badword['replacement'] = '*****'; }
|
{ $badword['replacement'] = '*****'; }
|
| $regex = $lang->no; if($badword['regex']) { $regex = $lang->yes; }
|
$table->construct_cell($badword['badword']); $table->construct_cell($badword['replacement']);
|
$table->construct_cell($badword['badword']); $table->construct_cell($badword['replacement']);
|
| $table->construct_cell($regex, array("class" => "align_center"));
|
$table->construct_cell("<a href=\"index.php?module=config-badwords&action=edit&bid={$badword['bid']}\">{$lang->edit}</a>", array("class" => "align_center")); $table->construct_cell("<a href=\"index.php?module=config-badwords&action=delete&bid={$badword['bid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_bad_word_deletion}');\">{$lang->delete}</a>", array("class" => "align_center")); $table->construct_row();
| $table->construct_cell("<a href=\"index.php?module=config-badwords&action=edit&bid={$badword['bid']}\">{$lang->edit}</a>", array("class" => "align_center")); $table->construct_cell("<a href=\"index.php?module=config-badwords&action=delete&bid={$badword['bid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_bad_word_deletion}');\">{$lang->delete}</a>", array("class" => "align_center")); $table->construct_row();
|
Zeile 259 | Zeile 271 |
---|
$form_container = new FormContainer($lang->add_bad_word); $form_container->output_row($lang->bad_word." <em>*</em>", $lang->bad_word_desc, $form->generate_text_box('badword', $mybb->input['badword'], array('id' => 'badword')), 'badword'); $form_container->output_row($lang->replacement, $lang->replacement_desc, $form->generate_text_box('replacement', $mybb->input['replacement'], array('id' => 'replacement')), 'replacement');
|
$form_container = new FormContainer($lang->add_bad_word); $form_container->output_row($lang->bad_word." <em>*</em>", $lang->bad_word_desc, $form->generate_text_box('badword', $mybb->input['badword'], array('id' => 'badword')), 'badword'); $form_container->output_row($lang->replacement, $lang->replacement_desc, $form->generate_text_box('replacement', $mybb->input['replacement'], array('id' => 'replacement')), 'replacement');
|
| $form_container->output_row($lang->regex, $lang->regex_desc, $form->generate_yes_no_radio('regex', !$mybb->get_input('regex'), array('id' => 'regex')), 'regex');
|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_bad_word); $form->output_submit_wrapper($buttons);
| $form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_bad_word); $form->output_submit_wrapper($buttons);
|