Vergleich admin/modules/user/group_promotions.php - 1.8.5 - 1.8.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 68Zeile 68

$plugins->run_hooks("admin_user_group_promotions_disable_commit");



$plugins->run_hooks("admin_user_group_promotions_disable_commit");


		$db->update_query("promotions", $update_promotion, "pid = '{$mybb->input['pid']}'");

		$db->update_query("promotions", $update_promotion, "pid = '{$promotion['pid']}'");


// Log admin action
log_admin_action($promotion['pid'], $promotion['title']);


// Log admin action
log_admin_action($promotion['pid'], $promotion['title']);

Zeile 108Zeile 108

if($mybb->request_method == "post")
{


if($mybb->request_method == "post")
{

		$db->delete_query("promotions", "pid = '{$mybb->input['pid']}'");

		$db->delete_query("promotions", "pid = '{$promotion['pid']}'");


$plugins->run_hooks("admin_user_group_promotions_delete_commit");



$plugins->run_hooks("admin_user_group_promotions_delete_commit");


Zeile 155Zeile 155

$plugins->run_hooks("admin_user_group_promotions_enable_commit");



$plugins->run_hooks("admin_user_group_promotions_enable_commit");


	$db->update_query("promotions", $update_promotion, "pid = '{$mybb->input['pid']}'");

	$db->update_query("promotions", $update_promotion, "pid = '{$promotion['pid']}'");


// Log admin action
log_admin_action($promotion['pid'], $promotion['title']);


// Log admin action
log_admin_action($promotion['pid'], $promotion['title']);

Zeile 224Zeile 224
			else
{
$mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup']));

			else
{
$mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup']));

 
			}

$allowed_operators = array('>', '>=', '=', '<=', '<');
$operator_fields = array('posttype', 'threadtype', 'timeregisteredtype', 'reputationtype', 'referralstype', 'warningstype');

foreach($operator_fields as $field)
{
if(!in_array($mybb->get_input($field), $allowed_operators))
{
$mybb->input[$field] = '=';
}

			}

$update_promotion = array(

			}

$update_promotion = array(

Zeile 253Zeile 264

$plugins->run_hooks("admin_user_group_promotions_edit_commit");



$plugins->run_hooks("admin_user_group_promotions_edit_commit");


			$db->update_query("promotions", $update_promotion, "pid = '".$mybb->get_input('pid', MyBB::INPUT_INT)."'");

			$db->update_query("promotions", $update_promotion, "pid = '{$promotion['pid']}'");


// Log admin action
log_admin_action($promotion['pid'], $mybb->input['title']);


// Log admin action
log_admin_action($promotion['pid'], $mybb->input['title']);

Zeile 275Zeile 286

$page->output_nav_tabs($sub_tabs, 'edit_promotion');
$form = new Form("index.php?module=user-group_promotions&amp;action=edit", "post", "edit");


$page->output_nav_tabs($sub_tabs, 'edit_promotion');
$form = new Form("index.php?module=user-group_promotions&amp;action=edit", "post", "edit");

	echo $form->generate_hidden_field("pid", $mybb->input['pid']);

	echo $form->generate_hidden_field("pid", $promotion['pid']);

	if($errors)
{
$page->output_inline_error($errors);

	if($errors)
{
$page->output_inline_error($errors);

Zeile 328Zeile 339
		"=" => $lang->equal_to,
"<=" => $lang->less_than_or_equal_to,
"<" => $lang->less_than

		"=" => $lang->equal_to,
"<=" => $lang->less_than_or_equal_to,
"<" => $lang->less_than

	);

	);


$form_container->output_row($lang->post_count, $lang->post_count_desc, $form->generate_numeric_field('postcount', $mybb->input['postcount'], array('id' => 'postcount', 'min' => 0))." ".$form->generate_select_box("posttype", $options_type, $mybb->input['posttype'], array('id' => 'posttype')), 'postcount');



$form_container->output_row($lang->post_count, $lang->post_count_desc, $form->generate_numeric_field('postcount', $mybb->input['postcount'], array('id' => 'postcount', 'min' => 0))." ".$form->generate_select_box("posttype", $options_type, $mybb->input['posttype'], array('id' => 'posttype')), 'postcount');


Zeile 404Zeile 415
		if(empty($mybb->input['requirements']))
{
$errors[] = $lang->error_no_requirements;

		if(empty($mybb->input['requirements']))
{
$errors[] = $lang->error_no_requirements;

		}

		}


if(empty($mybb->input['originalusergroup']))
{


if(empty($mybb->input['originalusergroup']))
{

Zeile 414Zeile 425
		if(!trim($mybb->input['newusergroup']))
{
$errors[] = $lang->error_no_new_usergroup;

		if(!trim($mybb->input['newusergroup']))
{
$errors[] = $lang->error_no_new_usergroup;

		}

		}


if(!trim($mybb->input['usergroupchangetype']))


if(!trim($mybb->input['usergroupchangetype']))

		{

		{

			$errors[] = $lang->error_no_usergroup_change_type;
}

			$errors[] = $lang->error_no_usergroup_change_type;
}





		if(!$errors)
{
if(in_array('*', $mybb->input['originalusergroup']))
{
$mybb->input['originalusergroup'] = '*';

		if(!$errors)
{
if(in_array('*', $mybb->input['originalusergroup']))
{
$mybb->input['originalusergroup'] = '*';

			}

			}

			else

			else

			{

			{

				$mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup']));

				$mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup']));

 
			}

$allowed_operators = array('>', '>=', '=', '<=', '<');
$operator_fields = array('posttype', 'threadtype', 'timeregisteredtype', 'reputationtype', 'referralstype', 'warningstype');

foreach($operator_fields as $field)
{
if(!in_array($mybb->get_input($field), $allowed_operators))
{
$mybb->input[$field] = '=';
}

			}

$new_promotion = array(

			}

$new_promotion = array(