Vergleich admin/modules/config/questions.php - 1.8.0 - 1.8.3

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 130Zeile 130
				"answer" => $db->escape_string($answer),
"active" => (int)$mybb->input['active']
);

				"answer" => $db->escape_string($answer),
"active" => (int)$mybb->input['active']
);

			$db->update_query("questions", $updated_question, "qid='{$question['qid']}'");





			$plugins->run_hooks("admin_config_questions_edit_commit");

			$plugins->run_hooks("admin_config_questions_edit_commit");

 

$db->update_query("questions", $updated_question, "qid='{$question['qid']}'");


// Log admin action
log_admin_action($question['qid'], $mybb->input['question']);


// Log admin action
log_admin_action($question['qid'], $mybb->input['question']);

Zeile 162Zeile 163
	else
{
$mybb->input = $question;

	else
{
$mybb->input = $question;

	}

	}


$form_container = new FormContainer($lang->edit_question);
$form_container->output_row($lang->question." <em>*</em>", $lang->question_desc, $form->generate_text_area('question', $mybb->input['question'], array('id' => 'question')), 'question');


$form_container = new FormContainer($lang->edit_question);
$form_container->output_row($lang->question." <em>*</em>", $lang->question_desc, $form->generate_text_area('question', $mybb->input['question'], array('id' => 'question')), 'question');

Zeile 170Zeile 171
	$form_container->output_row($lang->active." <em>*</em>", "", $form->generate_yes_no_radio('active', $mybb->input['active']));
$form_container->end();


	$form_container->output_row($lang->active." <em>*</em>", "", $form->generate_yes_no_radio('active', $mybb->input['active']));
$form_container->end();


	$buttons[] = $form->generate_submit_button($lang->save_question);


	$buttons[] = $form->generate_submit_button($lang->save_question);


	$form->output_submit_wrapper($buttons);
$form->end();


	$form->output_submit_wrapper($buttons);
$form->end();


Zeile 179Zeile 180
}

if($mybb->input['action'] == "delete")

}

if($mybb->input['action'] == "delete")

{

{

	if($mybb->input['no'])

	if($mybb->input['no'])

	{
admin_redirect("index.php?module=config-questions");
}

$query = $db->simple_select("questions", "*", "qid='".(int)$mybb->input['qid']."'");
$question = $db->fetch_array($query);

if(!$question['qid'])
{
flash_message($lang->error_invalid_question, 'error');
admin_redirect("index.php?module=config-questions");
}

$plugins->run_hooks("admin_config_questions_delete");


	{
admin_redirect("index.php?module=config-questions");
}

$query = $db->simple_select("questions", "*", "qid='".(int)$mybb->input['qid']."'");
$question = $db->fetch_array($query);

if(!$question['qid'])
{
flash_message($lang->error_invalid_question, 'error');
admin_redirect("index.php?module=config-questions");
}

$plugins->run_hooks("admin_config_questions_delete");


	if($mybb->request_method == "post")
{
$db->delete_query("questions", "qid='{$question['qid']}'");

	if($mybb->request_method == "post")
{
$db->delete_query("questions", "qid='{$question['qid']}'");

Zeile 216Zeile 217
}

if($mybb->input['action'] == "disable")

}

if($mybb->input['action'] == "disable")

{
$query = $db->simple_select("questions", "*", "qid='".(int)$mybb->input['qid']."'");
$question = $db->fetch_array($query);

if(!$question['qid'])
{
flash_message($lang->error_invalid_question, 'error');
admin_redirect("index.php?module=config-questions");
}

$plugins->run_hooks("admin_config_questions_disable");

$update_question = array(

{
$query = $db->simple_select("questions", "*", "qid='".(int)$mybb->input['qid']."'");
$question = $db->fetch_array($query);

if(!$question['qid'])
{
flash_message($lang->error_invalid_question, 'error');
admin_redirect("index.php?module=config-questions");
}

$plugins->run_hooks("admin_config_questions_disable");

$update_question = array(

		"active" => 0
);

		"active" => 0
);

	$db->update_query("questions", $update_question, "qid = '{$question['qid']}'");





	$plugins->run_hooks("admin_config_questions_disable_commit");

	$plugins->run_hooks("admin_config_questions_disable_commit");

 

$db->update_query("questions", $update_question, "qid = '{$question['qid']}'");


// Log admin action
log_admin_action($question['qid'], $question['question']);


// Log admin action
log_admin_action($question['qid'], $question['question']);

Zeile 258Zeile 260
	$update_question = array(
"active" => 1
);

	$update_question = array(
"active" => 1
);

	$db->update_query("questions", $update_question, "qid = '{$question['qid']}'");





	$plugins->run_hooks("admin_config_questions_enable_commit");

	$plugins->run_hooks("admin_config_questions_enable_commit");

 

$db->update_query("questions", $update_question, "qid = '{$question['qid']}'");


// Log admin action
log_admin_action($question['qid'], $question['question']);


// Log admin action
log_admin_action($question['qid'], $question['question']);