Vergleich admin/modules/config/mod_tools.php - 1.8.27 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 24Zeile 24
	$tool = $db->fetch_array($query);

// Does the post tool not exist?

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

// Does the post tool not exist?

	if(!$tool['tid'])

	if(!$tool)

	{
flash_message($lang->error_invalid_post_tool, 'error');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");

	{
flash_message($lang->error_invalid_post_tool, 'error');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");

Zeile 64Zeile 64
	$tool = $db->fetch_array($query);

// Does the post tool not exist?

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

// Does the post tool not exist?

	if(!$tool['tid'])

	if(!$tool)

	{
flash_message($lang->error_invalid_thread_tool, 'error');
admin_redirect("index.php?module=config-mod_tools");

	{
flash_message($lang->error_invalid_thread_tool, 'error');
admin_redirect("index.php?module=config-mod_tools");

Zeile 1153Zeile 1153

$page->output_footer();
}


$page->output_footer();
}

 

// This will be accounted for both GET and POST requests in both 'add_post_tool' / 'edit_post_tool'
$do_not_split_checked = '';
$split_same_checked = '';


if($mybb->input['action'] == "edit_post_tool")
{
$query = $db->simple_select("modtools", "COUNT(tid) as tools", "tid = '{$mybb->input['tid']}' AND type='p'");
if($db->fetch_field($query, "tools") < 1)


if($mybb->input['action'] == "edit_post_tool")
{
$query = $db->simple_select("modtools", "COUNT(tid) as tools", "tid = '{$mybb->input['tid']}' AND type='p'");
if($db->fetch_field($query, "tools") < 1)

	{

	{

		flash_message($lang->error_invalid_post_tool, 'error');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");
}

		flash_message($lang->error_invalid_post_tool, 'error');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");
}





	$plugins->run_hooks("admin_config_mod_tools_edit_post_tool");

if($mybb->request_method == 'post')

	$plugins->run_hooks("admin_config_mod_tools_edit_post_tool");

if($mybb->request_method == 'post')

Zeile 1170Zeile 1174
		if(trim($mybb->input['title']) == "")
{
$errors[] = $lang->error_missing_title;

		if(trim($mybb->input['title']) == "")
{
$errors[] = $lang->error_missing_title;

		}

		}


if(trim($mybb->input['description']) == "")
{
$errors[] = $lang->error_missing_description;


if(trim($mybb->input['description']) == "")
{
$errors[] = $lang->error_missing_description;

		}

		}


if($mybb->input['forum_type'] == 2)
{


if($mybb->input['forum_type'] == 2)
{

Zeile 1187Zeile 1191
		else
{
$mybb->input['forum_1_forums'] = '';

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

		}

		}


if($mybb->input['group_type'] == 2)
{


if($mybb->input['group_type'] == 2)
{

Zeile 1200Zeile 1204
		{
$mybb->input['group_1_groups'] = '';
}

		{
$mybb->input['group_1_groups'] = '';
}

	



		if($mybb->input['approvethread'] != '' && $mybb->input['approvethread'] != 'approve' && $mybb->input['approvethread'] != 'unapprove' && $mybb->input['approvethread'] != 'toggle')
{
$mybb->input['approvethread'] = '';

		if($mybb->input['approvethread'] != '' && $mybb->input['approvethread'] != 'approve' && $mybb->input['approvethread'] != 'unapprove' && $mybb->input['approvethread'] != 'toggle')
{
$mybb->input['approvethread'] = '';

		}


		}


		if($mybb->input['softdeletethread'] != '' && $mybb->input['softdeletethread'] != 'softdelete' && $mybb->input['softdeletethread'] != 'restore' && $mybb->input['softdeletethread'] != 'toggle')
{
$mybb->input['softdeletethread'] = '';

		if($mybb->input['softdeletethread'] != '' && $mybb->input['softdeletethread'] != 'softdelete' && $mybb->input['softdeletethread'] != 'restore' && $mybb->input['softdeletethread'] != 'toggle')
{
$mybb->input['softdeletethread'] = '';

		}


		}


		if($mybb->input['openthread'] != '' && $mybb->input['openthread'] != 'open' && $mybb->input['openthread'] != 'close' && $mybb->input['openthread'] != 'toggle')
{
$mybb->input['openthread'] = '';

		if($mybb->input['openthread'] != '' && $mybb->input['openthread'] != 'open' && $mybb->input['openthread'] != 'close' && $mybb->input['openthread'] != 'toggle')
{
$mybb->input['openthread'] = '';

		}

		}


if($mybb->input['stickthread'] != '' && $mybb->input['stickthread'] != 'stick' && $mybb->input['stickthread'] != 'unstick' && $mybb->input['stickthread'] != 'toggle')
{


if($mybb->input['stickthread'] != '' && $mybb->input['stickthread'] != 'stick' && $mybb->input['stickthread'] != 'unstick' && $mybb->input['stickthread'] != 'toggle')
{

Zeile 1222Zeile 1226
		}

if($mybb->input['move_type'] == 2)

		}

if($mybb->input['move_type'] == 2)

		{

		{

			if(!$mybb->input['move_1_forum'])
{
$errors[] = $lang->error_no_move_forum_selected;

			if(!$mybb->input['move_1_forum'])
{
$errors[] = $lang->error_no_move_forum_selected;

			}
else

			}
else

			{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".$mybb->get_input('move_1_forum', MyBB::INPUT_INT)."'");

			{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".$mybb->get_input('move_1_forum', MyBB::INPUT_INT)."'");

				if($db->fetch_field($query, "type") == "c")

				if($db->fetch_field($query, "type") == "c")

				{
$errors[] = $lang->error_forum_is_category;
}

				{
$errors[] = $lang->error_forum_is_category;
}

			}

			}

		}
else
{

		}
else
{

Zeile 1256Zeile 1260
				if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;

				if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;

				}

				}

			}
}
else

			}
}
else

Zeile 1426Zeile 1430

$form = new Form("index.php?module=config-mod_tools&amp;action=edit_post_tool", 'post');
echo $form->generate_hidden_field("tid", $mybb->input['tid']);


$form = new Form("index.php?module=config-mod_tools&amp;action=edit_post_tool", 'post');
echo $form->generate_hidden_field("tid", $mybb->input['tid']);

 



if($errors)
{


if($errors)
{

Zeile 1508Zeile 1513
		if($post_options['splitposts'] == '-1')
{
$do_not_split_checked = ' selected="selected"';

		if($post_options['splitposts'] == '-1')
{
$do_not_split_checked = ' selected="selected"';

			$split_same_checked = '';

 
		}
else if($post_options['splitposts'] == '-2')
{

		}
else if($post_options['splitposts'] == '-2')
{

			$do_not_split_checked = '';

 
			$split_same_checked = ' selected="selected"';
}


			$split_same_checked = ' selected="selected"';
}


Zeile 2121Zeile 2124
		$mybb->input['newreply'] = '';
$mybb->input['newreplysubject'] = '{subject}';
$do_not_split_checked = ' selected="selected"';

		$mybb->input['newreply'] = '';
$mybb->input['newreplysubject'] = '{subject}';
$do_not_split_checked = ' selected="selected"';

		$split_same_checked = '';

 
		$mybb->input['deleteposts'] = '0';
$mybb->input['mergeposts'] = '0';
$mybb->input['approveposts'] = '';

		$mybb->input['deleteposts'] = '0';
$mybb->input['mergeposts'] = '0';
$mybb->input['approveposts'] = '';