Vergleich admin/modules/user/group_promotions.php - 1.8.10 - 1.8.11

  Keine ├änderungen   Hinzugef├╝gt   Modifiziert   Entfernt
Zeile 172Zeile 172
		admin_redirect("index.php?module=user-group_promotions");
}


		admin_redirect("index.php?module=user-group_promotions");
}


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

	$query = $db->simple_select("promotions", "*", "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'");

	$promotion = $db->fetch_array($query);

if(!$promotion)

	$promotion = $db->fetch_array($query);

if(!$promotion)

Zeile 227Zeile 227
			}

$allowed_operators = array('>', '>=', '=', '<=', '<');

			}

$allowed_operators = array('>', '>=', '=', '<=', '<');

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

			$operator_fields = array('posttype', 'threadtype', 'reputationtype', 'referralstype', 'warningstype');


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


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

 
				}
}

$allowed_times = array('hours', 'days', 'weeks', 'months', 'years');
$time_fields = array('timeregisteredtype', 'timeonlinetype');

foreach($time_fields as $field)
{
if(!in_array($mybb->get_input($field), $allowed_times))
{
$mybb->input[$field] = 'days';

				}
}


				}
}


Zeile 263Zeile 274
			);

$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 = '{$promotion['pid']}'");

// Log admin action

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

// Log admin action

Zeile 290Zeile 301
	if($errors)
{
$page->output_inline_error($errors);

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

	}

	}

	else
{
$mybb->input['title'] = $promotion['title'];

	else
{
$mybb->input['title'] = $promotion['title'];

Zeile 315Zeile 326
		$mybb->input['newusergroup'] = $promotion['newusergroup'];
$mybb->input['enabled'] = $promotion['enabled'];
$mybb->input['logging'] = $promotion['logging'];

		$mybb->input['newusergroup'] = $promotion['newusergroup'];
$mybb->input['enabled'] = $promotion['enabled'];
$mybb->input['logging'] = $promotion['logging'];

	}


	}


	$form_container = new FormContainer($lang->edit_promotion);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_desc." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');

	$form_container = new FormContainer($lang->edit_promotion);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_desc." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');

Zeile 370Zeile 381
	{
$options[(int)$usergroup['gid']] = $usergroup['title'];
}

	{
$options[(int)$usergroup['gid']] = $usergroup['title'];
}





	$form_container->output_row($lang->orig_user_group." <em>*</em>", $lang->orig_user_group_desc, $form->generate_select_box('originalusergroup[]', $options, $mybb->input['originalusergroup'], array('id' => 'originalusergroup', 'multiple' => true, 'size' => 5)), 'originalusergroup');

unset($options['*']); // Remove the all usergroups option

	$form_container->output_row($lang->orig_user_group." <em>*</em>", $lang->orig_user_group_desc, $form->generate_select_box('originalusergroup[]', $options, $mybb->input['originalusergroup'], array('id' => 'originalusergroup', 'multiple' => true, 'size' => 5)), 'originalusergroup');

unset($options['*']); // Remove the all usergroups option

Zeile 423Zeile 434
		}

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

		}

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

		{

		{

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


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


Zeile 444Zeile 455
			}

$allowed_operators = array('>', '>=', '=', '<=', '<');

			}

$allowed_operators = array('>', '>=', '=', '<=', '<');

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

foreach($operator_fields as $field)












			$operator_fields = array('posttype', 'threadtype', 'reputationtype', 'referralstype', 'warningstype');

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

$allowed_times = array('hours', 'days', 'weeks', 'months', 'years');
$time_fields = array('timeregisteredtype', 'timeonlinetype');

foreach($time_fields as $field)

			{

			{

				if(!in_array($mybb->get_input($field), $allowed_operators))

				if(!in_array($mybb->get_input($field), $allowed_times))

				{

				{

					$mybb->input[$field] = '=';

					$mybb->input[$field] = 'days';

				}
}


				}
}