Vergleich admin/modules/config/mod_tools.php - 1.6.5 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: mod_tools.php 5353 2011-02-15 14:24:00Z Tomm $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 48Zeile 48

// Log admin action
log_admin_action($tool['tid'], $tool['name']);


// Log admin action
log_admin_action($tool['tid'], $tool['name']);

 
		$cache->update_forumsdisplay();


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


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

Zeile 67Zeile 68
	
// Does the post tool not exist?
if(!$tool['tid'])

	
// Does the post tool not exist?
if(!$tool['tid'])

	{
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");

	}

// User clicked no

	}

// User clicked no

Zeile 136Zeile 137
		$table->construct_cell("<a href=\"index.php?module=config-mod_tools&amp;action=edit_post_tool&amp;tid={$tool['tid']}\"><strong>".htmlspecialchars_uni($tool['name'])."</strong></a><br /><small>".htmlspecialchars_uni($tool['description'])."</small>");
$table->construct_cell("<a href=\"index.php?module=config-mod_tools&amp;action=edit_post_tool&amp;tid={$tool['tid']}\">{$lang->edit}</a>", array('width' => 100, 'class' => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-mod_tools&amp;action=delete_post_tool&amp;tid={$tool['tid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_post_tool_deletion}')\">{$lang->delete}</a>", array('width' => 100, 'class' => "align_center"));

		$table->construct_cell("<a href=\"index.php?module=config-mod_tools&amp;action=edit_post_tool&amp;tid={$tool['tid']}\"><strong>".htmlspecialchars_uni($tool['name'])."</strong></a><br /><small>".htmlspecialchars_uni($tool['description'])."</small>");
$table->construct_cell("<a href=\"index.php?module=config-mod_tools&amp;action=edit_post_tool&amp;tid={$tool['tid']}\">{$lang->edit}</a>", array('width' => 100, 'class' => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-mod_tools&amp;action=delete_post_tool&amp;tid={$tool['tid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_post_tool_deletion}')\">{$lang->delete}</a>", array('width' => 100, 'class' => "align_center"));

		$table->construct_row();
}

		$table->construct_row();
}

	
if($table->num_rows() == 0)

	
if($table->num_rows() == 0)

	{

	{

		$table->construct_cell($lang->no_post_tools, array('colspan' => 3));
$table->construct_row();

		$table->construct_cell($lang->no_post_tools, array('colspan' => 3));
$table->construct_row();

	}


	}


	$table->output($lang->post_tools);

	$table->output($lang->post_tools);

	

	

	$page->output_footer();
}


	$page->output_footer();
}


Zeile 160Zeile 161
		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");
}





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

	if($mybb->request_method == 'post')
{
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;

Zeile 181Zeile 182
			if(count($mybb->input['forum_1_forums']) < 1)
{
$errors[] = $lang->error_no_forums_selected;

			if(count($mybb->input['forum_1_forums']) < 1)
{
$errors[] = $lang->error_no_forums_selected;

			}
}
else

			}
}
else

		{
$forum_checked[1] = "checked=\"checked\"";
$forum_checked[2] = '';

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

		{
$forum_checked[1] = "checked=\"checked\"";
$forum_checked[2] = '';

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

		}

		}

		

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['openthread'] != '' && $mybb->input['openthread'] != 'open' && $mybb->input['openthread'] != 'close' && $mybb->input['openthread'] != 'toggle')

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

		{

		{

			$mybb->input['openthread'] = '';
}


			$mybb->input['openthread'] = '';
}


Zeile 206Zeile 207
		{
$move_checked[1] = '';
$move_checked[2] = "checked=\"checked\"";

		{
$move_checked[1] = '';
$move_checked[2] = "checked=\"checked\"";





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

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

			{

			{

				// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}

				// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}

			}


			}


			if($mybb->input['move_2_redirect'] != 1 && $mybb->input['move_2_redirect'] != 0)
{
$mybb->input['move_2_redirect'] = 0;

			if($mybb->input['move_2_redirect'] != 1 && $mybb->input['move_2_redirect'] != 0)
{
$mybb->input['move_2_redirect'] = 0;

Zeile 229Zeile 230
			if(!isset($mybb->input['move_3_redirecttime']))
{
$mybb->input['move_3_redirecttime'] = '';

			if(!isset($mybb->input['move_3_redirecttime']))
{
$mybb->input['move_3_redirecttime'] = '';

			}
}
else
{
$move_checked[1] = "checked=\"checked\"";
$move_checked[2] = '';


			}
}
else
{
$move_checked[1] = "checked=\"checked\"";
$move_checked[2] = '';


			$mybb->input['move_1_forum'] = '';
$mybb->input['move_2_redirect'] = 0;
$mybb->input['move_3_redirecttime'] = '';

			$mybb->input['move_1_forum'] = '';
$mybb->input['move_2_redirect'] = 0;
$mybb->input['move_3_redirecttime'] = '';

Zeile 268Zeile 269
		}

if(!$errors)

		}

if(!$errors)

		{

		{

			$thread_options = array(
'deletethread' => $mybb->input['deletethread'],
'mergethreads' => $mybb->input['mergethreads'],

			$thread_options = array(
'deletethread' => $mybb->input['deletethread'],
'mergethreads' => $mybb->input['mergethreads'],

Zeile 327Zeile 328

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


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

	

	

	if($errors)

	if($errors)

	{

	{

		$page->output_inline_error($errors);
}
else

		$page->output_inline_error($errors);
}
else

Zeile 346Zeile 347
		{
$forum_checked[1] = "checked=\"checked\"";
$forum_checked[2] = '';

		{
$forum_checked[1] = "checked=\"checked\"";
$forum_checked[2] = '';

		}
else

		}
else

		{
$forum_checked[1] = '';
$forum_checked[2] = "checked=\"checked\"";

		{
$forum_checked[1] = '';
$forum_checked[2] = "checked=\"checked\"";

Zeile 387Zeile 388
		$mybb->input['deletepoll'] = $thread_options['deletepoll'];
$mybb->input['removeredirects'] = $thread_options['removeredirects'];
$mybb->input['threadprefix'] = $thread_options['threadprefix'];

		$mybb->input['deletepoll'] = $thread_options['deletepoll'];
$mybb->input['removeredirects'] = $thread_options['removeredirects'];
$mybb->input['threadprefix'] = $thread_options['threadprefix'];

		$mybb->input['newsubject'] = $thread_options['newsubject'];
$mybb->input['newreply'] = $thread_options['addreply'];
$mybb->input['newreplysubject'] = $thread_options['replysubject'];
}

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


$actions = "<script type=\"text/javascript\">
function checkAction(id)
{
var checked = '';

$$('.'+id+'s_check').each(function(e)
{
if(e.checked == true)
{
checked = e.value;
}
});
$$('.'+id+'s').each(function(e)
{
Element.hide(e);
});
if($(id+'_'+checked))
{
Element.show(id+'_'+checked);
}
}
</script>
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">

		$mybb->input['newsubject'] = $thread_options['newsubject'];
$mybb->input['newreply'] = $thread_options['addreply'];
$mybb->input['newreplysubject'] = $thread_options['replysubject'];
}

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


$actions = "<script type=\"text/javascript\">
function checkAction(id)
{
var checked = '';

$$('.'+id+'s_check').each(function(e)
{
if(e.checked == true)
{
checked = e.value;
}
});
$$('.'+id+'s').each(function(e)
{
Element.hide(e);
});
if($(id+'_'+checked))
{
Element.show(id+'_'+checked);
}
}
</script>
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">

			<table cellpadding=\"4\">
<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>

			<table cellpadding=\"4\">
<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>

Zeile 469Zeile 470
				<tr>
<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'], array('style' => 'width: 2em;'))."</td>

				<tr>
<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'], array('style' => 'width: 2em;'))."</td>

				</tr>

				</tr>

				<tr>
<td><small>{$lang->delete_redirect_after}</small></td>
<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>

				<tr>
<td><small>{$lang->delete_redirect_after}</small></td>
<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>

Zeile 515Zeile 516
		while($prefix = $db->fetch_array($query))
{
$thread_prefixes[$prefix['pid']] = $prefix['prefix'];

		while($prefix = $db->fetch_array($query))
{
$thread_prefixes[$prefix['pid']] = $prefix['prefix'];

		}


		}


		$form_container->output_row($lang->apply_thread_prefix." <em>*</em>", '', $form->generate_select_box('threadprefix', $thread_prefixes, array(intval($mybb->input['threadprefix'])), array('id' => 'threadprefix')), 'threadprefix');
}


		$form_container->output_row($lang->apply_thread_prefix." <em>*</em>", '', $form->generate_select_box('threadprefix', $thread_prefixes, array(intval($mybb->input['threadprefix'])), array('id' => 'threadprefix')), 'threadprefix');
}


Zeile 563Zeile 564
			}
}
else

			}
}
else

		{

		{

			$forum_checked[1] = "checked=\"checked\"";
$forum_checked[2] = '';

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

			$forum_checked[1] = "checked=\"checked\"";
$forum_checked[2] = '';

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

		}



		}



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

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

		{

		{

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

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

		}

		}

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

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

		{

		{

			$mybb->input['openthread'] = '';
}


			$mybb->input['openthread'] = '';
}


		if(!intval($mybb->input['threadprefix']))
{
$mybb->input['threadprefix'] = '';
}

if($mybb->input['move_type'] == 2)
{
$move_checked[1] = '';
$move_checked[2] = "checked=\"checked\"";

if(!$mybb->input['move_1_forum'])
{
$errors[] = $lang->error_no_move_forum_selected;
}
else
{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}
else
{
$move_checked[1] = "checked=\"checked\"";
$move_checked[2] = '';


		if(!intval($mybb->input['threadprefix']))
{
$mybb->input['threadprefix'] = '';
}

if($mybb->input['move_type'] == 2)
{
$move_checked[1] = '';
$move_checked[2] = "checked=\"checked\"";

if(!$mybb->input['move_1_forum'])
{
$errors[] = $lang->error_no_move_forum_selected;
}
else
{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}
else
{
$move_checked[1] = "checked=\"checked\"";
$move_checked[2] = '';


			$mybb->input['move_1_forum'] = '';
$mybb->input['move_2_redirect'] = 0;
$mybb->input['move_3_redirecttime'] = '';

			$mybb->input['move_1_forum'] = '';
$mybb->input['move_2_redirect'] = 0;
$mybb->input['move_3_redirecttime'] = '';

Zeile 621Zeile 622
			$copy_checked[2] = "checked=\"checked\"";

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

			$copy_checked[2] = "checked=\"checked\"";

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

			{

			{

				$errors[] = $lang->error_no_copy_forum_selected;

				$errors[] = $lang->error_no_copy_forum_selected;

			}
else
{

			}
else
{

				$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['copy_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{

				$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['copy_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{

Zeile 668Zeile 669
			$new_tool['postoptions'] = '';

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

			$new_tool['postoptions'] = '';

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

			{

			{

				if(is_array($mybb->input['forum_1_forums']))
{
foreach($mybb->input['forum_1_forums'] as $fid)

				if(is_array($mybb->input['forum_1_forums']))
{
foreach($mybb->input['forum_1_forums'] as $fid)

Zeile 755Zeile 756
		$mybb->input['newsubject'] = '{subject}';
$mybb->input['newreply'] = '';
$mybb->input['newreplysubject'] = '{subject}';

		$mybb->input['newsubject'] = '{subject}';
$mybb->input['newreply'] = '';
$mybb->input['newreplysubject'] = '{subject}';

	}

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


$actions = "<script type=\"text/javascript\">
function checkAction(id)
{
var checked = '';

$$('.'+id+'s_check').each(function(e)
{
if(e.checked == true)
{
checked = e.value;
}
});
$$('.'+id+'s').each(function(e)
{
Element.hide(e);
});
if($(id+'_'+checked))
{
Element.show(id+'_'+checked);
}
}
</script>
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">
<table cellpadding=\"4\">
<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>
</tr>
</table>
</dd>
</dl>
<script type=\"text/javascript\">

	}

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


$actions = "<script type=\"text/javascript\">
function checkAction(id)
{
var checked = '';

$$('.'+id+'s_check').each(function(e)
{
if(e.checked == true)
{
checked = e.value;
}
});
$$('.'+id+'s').each(function(e)
{
Element.hide(e);
});
if($(id+'_'+checked))
{
Element.show(id+'_'+checked);
}
}
</script>
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">
<table cellpadding=\"4\">
<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>
</tr>
</table>
</dd>
</dl>
<script type=\"text/javascript\">

	checkAction('forum');
</script>";
$form_container->output_row($lang->available_in_forums." <em>*</em>", '', $actions);

	checkAction('forum');
</script>";
$form_container->output_row($lang->available_in_forums." <em>*</em>", '', $actions);

Zeile 819Zeile 820
	$form_container = new FormContainer($lang->thread_moderation);
$form_container->output_row($lang->approve_unapprove." <em>*</em>", '', $form->generate_select_box('approvethread', $approve_unapprove, $mybb->input['approvethread'], array('id' => 'approvethread')), 'approvethread');
$form_container->output_row($lang->open_close_thread." <em>*</em>", '', $form->generate_select_box('openthread', $open_close, $mybb->input['openthread'], array('id' => 'openthread')), 'openthread');

	$form_container = new FormContainer($lang->thread_moderation);
$form_container->output_row($lang->approve_unapprove." <em>*</em>", '', $form->generate_select_box('approvethread', $approve_unapprove, $mybb->input['approvethread'], array('id' => 'approvethread')), 'approvethread');
$form_container->output_row($lang->open_close_thread." <em>*</em>", '', $form->generate_select_box('openthread', $open_close, $mybb->input['openthread'], array('id' => 'openthread')), 'openthread');



$actions = "
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">



$actions = "
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">

	<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"1\" {$move_checked[1]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->do_not_move_thread}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"2\" {$move_checked[2]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->move_thread}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"move_2\" class=\"moves\">

	<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"1\" {$move_checked[1]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->do_not_move_thread}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"2\" {$move_checked[2]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->move_thread}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"move_2\" class=\"moves\">

Zeile 830Zeile 831
				<tr>
<td><small>{$lang->forum_to_move_to}</small></td>
<td>".$form->generate_forum_select('move_1_forum', $mybb->input['move_1_forum'])."</td>

				<tr>
<td><small>{$lang->forum_to_move_to}</small></td>
<td>".$form->generate_forum_select('move_1_forum', $mybb->input['move_1_forum'])."</td>

				</tr>
<tr>

				</tr>
<tr>

					<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'], array('style' => 'width: 2em;'))."</td>
</tr>

					<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'], array('style' => 'width: 2em;'))."</td>
</tr>

Zeile 844Zeile 845
	</dl>
<script type=\"text/javascript\">
checkAction('move');

	</dl>
<script type=\"text/javascript\">
checkAction('move');

	</script>";

	</script>";

	$form_container->output_row($lang->move_thread." <em>*</em>", $lang->move_thread_desc, $actions);

$actions = "

	$form_container->output_row($lang->move_thread." <em>*</em>", $lang->move_thread_desc, $actions);

$actions = "

Zeile 935Zeile 936
		{
$mybb->input['forum_1_forums'] = '';
}

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

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

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

if($mybb->input['move_type'] == 2)
{
if(!$mybb->input['move_1_forum'])
{
$errors[] = $lang->error_no_move_forum_selected;
}
else
{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}
else
{
$mybb->input['move_1_forum'] = '';
$mybb->input['move_2_redirect'] = 0;
$mybb->input['move_3_redirecttime'] = '';
}

if($mybb->input['copy_type'] == 2)
{
if(!$mybb->input['copy_1_forum'])
{
$errors[] = $lang->error_no_copy_forum_selected;
}
else
{
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['copy_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}

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

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

if($mybb->input['move_type'] == 2)
{
if(!$mybb->input['move_1_forum'])
{
$errors[] = $lang->error_no_move_forum_selected;
}
else
{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}
else
{
$mybb->input['move_1_forum'] = '';
$mybb->input['move_2_redirect'] = 0;
$mybb->input['move_3_redirecttime'] = '';
}

if($mybb->input['copy_type'] == 2)
{
if(!$mybb->input['copy_1_forum'])
{
$errors[] = $lang->error_no_copy_forum_selected;
}
else
{
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['copy_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}

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

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

Zeile 992Zeile 993
		if($mybb->input['approveposts'] != '' && $mybb->input['approveposts'] != 'approve' && $mybb->input['approveposts'] != 'unapprove' && $mybb->input['approveposts'] != 'toggle')
{
$mybb->input['approveposts'] = '';

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

		}

		}

		
if($mybb->input['splitposts'] < -2)

		
if($mybb->input['splitposts'] < -2)

		{

		{

			$mybb->input['splitposts'] = -1;
}


			$mybb->input['splitposts'] = -1;
}


Zeile 1006Zeile 1007
		else
{
$mybb->input['splitpostsclose'] = '';

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

		}


		}


		if($mybb->input['splitpostsstick'] == 1)
{
$mybb->input['splitpostsstick'] = 'stick';

		if($mybb->input['splitpostsstick'] == 1)
{
$mybb->input['splitpostsstick'] = 'stick';

Zeile 1081Zeile 1082

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


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

 
			$cache->update_forumsdisplay();

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

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

Zeile 1169Zeile 1171
		else if($post_options['splitposts'] == '-2')
{
$do_not_split_checked = '';

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

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

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

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

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

Zeile 1545Zeile 1547

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


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

 
			$cache->update_forumsdisplay();

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

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