Vergleich admin/modules/style/templates.php - 1.8.5 - 1.8.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 102Zeile 102
$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC'));
while($template_set = $db->fetch_array($query))
{

$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC'));
while($template_set = $db->fetch_array($query))
{

	$template_sets[$template_set['sid']] = $template_set['title'];

	$template_sets[$template_set['sid']] = htmlspecialchars_uni($template_set['title']);

}

$plugins->run_hooks("admin_style_templates");

}

$plugins->run_hooks("admin_style_templates");

Zeile 157Zeile 157
	$form = new Form("index.php?module=style-templates&action=add_set", "post", "add_set");

$form_container = new FormContainer($lang->add_set);

	$form = new Form("index.php?module=style-templates&action=add_set", "post", "add_set");

$form_container = new FormContainer($lang->add_set);

	$form_container->output_row($lang->title, "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');

	$form_container->output_row($lang->title, "", $form->generate_text_box('title', htmlspecialchars_uni($mybb->input['title']), array('id' => 'title')), 'title');

	$form_container->end();

$buttons = array();

	$form_container->end();

$buttons = array();

Zeile 240Zeile 240
		if(!$sid)
{
$sid = -1;

		if(!$sid)
{
$sid = -1;

		}

		}


$template['template'] = "";
$template['sid'] = $sid;


$template['template'] = "";
$template['sid'] = $sid;

Zeile 254Zeile 254
	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>
<script src="./jscripts/codemirror/addon/search/search.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">

';
}


';
}


Zeile 341Zeile 341
		if(!$prefix)
{
$errors[] = $lang->error_missing_group_prefix;

		if(!$prefix)
{
$errors[] = $lang->error_missing_group_prefix;

 
		}

if(strpos($prefix, "_") !== false)
{
$errors[] = $lang->error_invalid_group_title;

		}

$title = trim($mybb->input['title']);

		}

$title = trim($mybb->input['title']);

Zeile 391Zeile 396

$page->add_breadcrumb_item($lang->add_template_group);
$page->output_header($lang->add_template_group);


$page->add_breadcrumb_item($lang->add_template_group);
$page->output_header($lang->add_template_group);

	$page->output_nav_tabs($sub_tabs, 'add_template_group');

if($errors)

	$page->output_nav_tabs($sub_tabs, 'add_template_group');

if($errors)

	{
$template_group = array(
'prefix' => $prefix,

	{
$template_group = array(
'prefix' => $prefix,

Zeile 477Zeile 482
	if($errors)
{
$page->output_inline_error($errors);

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

	}

	}

	else
{
$query = $db->simple_select("templatesets", "title", "sid='{$sid}'");

	else
{
$query = $db->simple_select("templatesets", "title", "sid='{$sid}'");

Zeile 504Zeile 509
if($mybb->input['action'] == "edit_template")
{
if(!$mybb->input['title'] || !$sid || !isset($template_sets[$sid]))

if($mybb->input['action'] == "edit_template")
{
if(!$mybb->input['title'] || !$sid || !isset($template_sets[$sid]))

	{

	{

		flash_message($lang->error_missing_input, 'error');
admin_redirect("index.php?module=style-templates");
}

		flash_message($lang->error_missing_input, 'error');
admin_redirect("index.php?module=style-templates");
}

Zeile 558Zeile 563
				else
{
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");

				else
{
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");

				}
}
else

				}
}
else

			{
// Global template set
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");

			{
// Global template set
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");

			}

$plugins->run_hooks("admin_style_templates_edit_template_commit");


			}

$plugins->run_hooks("admin_style_templates_edit_template_commit");


			$query = $db->simple_select("templatesets", "title", "sid='{$sid}'");
$set = $db->fetch_array($query);


			$query = $db->simple_select("templatesets", "title", "sid='{$sid}'");
$set = $db->fetch_array($query);


Zeile 581Zeile 586
			{
$group = "-1";
}

			{
$group = "-1";
}





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

flash_message($lang->success_template_saved, 'success');

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

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

flash_message($lang->success_template_saved, 'success');

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

			{

			{

				if($mybb->input['from'] == "diff_report")
{
admin_redirect("index.php?module=style-templates&action=edit_template&title=".urlencode($mybb->input['title'])."&sid=".$mybb->get_input('sid', MyBB::INPUT_INT).$expand_str2."&amp;from=diff_report");

				if($mybb->input['from'] == "diff_report")
{
admin_redirect("index.php?module=style-templates&action=edit_template&title=".urlencode($mybb->input['title'])."&sid=".$mybb->get_input('sid', MyBB::INPUT_INT).$expand_str2."&amp;from=diff_report");

				}

				}

				else
{
admin_redirect("index.php?module=style-templates&action=edit_template&title=".urlencode($mybb->input['title'])."&sid=".$mybb->get_input('sid', MyBB::INPUT_INT).$expand_str2);

				else
{
admin_redirect("index.php?module=style-templates&action=edit_template&title=".urlencode($mybb->input['title'])."&sid=".$mybb->get_input('sid', MyBB::INPUT_INT).$expand_str2);

Zeile 615Zeile 620
	if($errors)
{
$template = $mybb->input;

	if($errors)
{
$template = $mybb->input;

	}

	}

	else
{
$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND (sid='-2' OR sid='{$sid}')", array('order_by' => 'sid', 'order_dir' => 'DESC', 'limit' => 1));

	else
{
$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND (sid='-2' OR sid='{$sid}')", array('order_by' => 'sid', 'order_dir' => 'DESC', 'limit' => 1));

Zeile 626Zeile 631
	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>
<script src="./jscripts/codemirror/addon/search/search.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">

';
}


';
}


Zeile 680Zeile 685
		'title' => $lang->edit_template,
'link' => "index.php?module=style-templates&amp;action=edit_template&amp;title=".htmlspecialchars_uni($template['title']).$expand_str,
'description' => $lang->edit_template_desc

		'title' => $lang->edit_template,
'link' => "index.php?module=style-templates&amp;action=edit_template&amp;title=".htmlspecialchars_uni($template['title']).$expand_str,
'description' => $lang->edit_template_desc

	);

$page->output_nav_tabs($sub_tabs, 'edit_template');

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

	);

$page->output_nav_tabs($sub_tabs, 'edit_template');

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

	}

$form = new Form("index.php?module=style-templates&amp;action=edit_template{$expand_str}", "post", "edit_template");
echo $form->generate_hidden_field('tid', $template['tid'])."\n";

if($mybb->input['from'] == "diff_report")

	}

$form = new Form("index.php?module=style-templates&amp;action=edit_template{$expand_str}", "post", "edit_template");
echo $form->generate_hidden_field('tid', $template['tid'])."\n";

if($mybb->input['from'] == "diff_report")

	{

	{

		echo $form->generate_hidden_field('from', "diff_report");
}


		echo $form->generate_hidden_field('from', "diff_report");
}


Zeile 707Zeile 712
	}

$form_container->output_row($lang->template_set, $lang->template_set_desc, $form->generate_select_box('sid', $template_sets, $sid));

	}

$form_container->output_row($lang->template_set, $lang->template_set_desc, $form->generate_select_box('sid', $template_sets, $sid));





	$form_container->output_row("", "", $form->generate_text_area('template', $template['template'], array('id' => 'template', 'class' => '', 'style' => 'width: 100%; height: 500px;')));
$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_continue, array('name' => 'continue'));
$buttons[] = $form->generate_submit_button($lang->save_close, array('name' => 'close'));


	$form_container->output_row("", "", $form->generate_text_area('template', $template['template'], array('id' => 'template', 'class' => '', 'style' => 'width: 100%; height: 500px;')));
$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_continue, array('name' => 'continue'));
$buttons[] = $form->generate_submit_button($lang->save_close, array('name' => 'close'));


	$form->output_submit_wrapper($buttons);


	$form->output_submit_wrapper($buttons);


	$form->end();

if($admin_options['codepress'] != 0)

	$form->end();

if($admin_options['codepress'] != 0)

Zeile 741Zeile 746
if($mybb->input['action'] == "edit_template_group")
{
$query = $db->simple_select("templategroups", "*", "gid = '".$mybb->get_input('gid', MyBB::INPUT_INT)."'");

if($mybb->input['action'] == "edit_template_group")
{
$query = $db->simple_select("templategroups", "*", "gid = '".$mybb->get_input('gid', MyBB::INPUT_INT)."'");





	if(!$db->num_rows($query))
{
flash_message($lang->error_missing_template_group, 'error');

	if(!$db->num_rows($query))
{
flash_message($lang->error_missing_template_group, 'error');

		admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}


		admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}


	$template_group = $db->fetch_array($query);
if(isset($template_group['isdefault']) && $template_group['isdefault'] == 1)

	$template_group = $db->fetch_array($query);
if(isset($template_group['isdefault']) && $template_group['isdefault'] == 1)

	{

	{

		flash_message($lang->error_default_template_group, 'error');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}

		flash_message($lang->error_default_template_group, 'error');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}{$expand_str}");
}

Zeile 764Zeile 769
		if(!$prefix)
{
$errors[] = $lang->error_missing_group_prefix;

		if(!$prefix)
{
$errors[] = $lang->error_missing_group_prefix;

 
		}

if(strpos($prefix, "_") !== false)
{
$errors[] = $lang->error_invalid_group_title;

		}

$title = trim($mybb->input['title']);

		}

$title = trim($mybb->input['title']);

Zeile 797Zeile 807
				$plugins->run_hooks('admin_style_templates_edit_template_group_commit');

$db->update_query('templategroups', $update_array, "gid = '{$template_group['gid']}'");

				$plugins->run_hooks('admin_style_templates_edit_template_group_commit');

$db->update_query('templategroups', $update_array, "gid = '{$template_group['gid']}'");


log_admin_action($template_group['gid'], htmlspecialchars_uni($title));


log_admin_action($template_group['gid'], $title);

				flash_message($lang->success_template_group_saved, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}

				flash_message($lang->success_template_group_saved, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}

Zeile 850Zeile 860
			// Search and replace in templates

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

			// Search and replace in templates

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

			{
flash_message($lang->search_noneset, "error");
admin_redirect("index.php?module=style-templates&action=search_replace");
}

			{
flash_message($lang->search_noneset, "error");
admin_redirect("index.php?module=style-templates&action=search_replace");
}

			else
{
$page->add_breadcrumb_item($lang->search_replace);

$page->output_header($lang->search_replace);

			else
{
$page->add_breadcrumb_item($lang->search_replace);

$page->output_header($lang->search_replace);





				$plugins->run_hooks("admin_style_templates_search_replace_find");

$page->output_nav_tabs($sub_tabs, 'search_replace');

				$plugins->run_hooks("admin_style_templates_search_replace_find");

$page->output_nav_tabs($sub_tabs, 'search_replace');

Zeile 868Zeile 878
				$table = new Table;

$template_sets = array();

				$table = new Table;

$template_sets = array();





				// Get the names of all template sets
$template_sets[-2] = $lang->master_templates;
$template_sets[-1] = $lang->global_templates;

				// Get the names of all template sets
$template_sets[-2] = $lang->master_templates;
$template_sets[-1] = $lang->global_templates;

Zeile 878Zeile 888
				{
$template_sets[$set['sid']] = $set['title'];
}

				{
$template_sets[$set['sid']] = $set['title'];
}

 

$search_string = str_replace(array("\r\n", "\r"), "\n", $mybb->input['find']);
$search_string = str_replace(array(" ", "\t"), "", $search_string);


// Select all templates with that search term
$query = $db->query("


// Select all templates with that search term
$query = $db->query("

Zeile 885Zeile 898
					FROM ".TABLE_PREFIX."templates t
LEFT JOIN ".TABLE_PREFIX."templatesets s ON (t.sid=s.sid)
LEFT JOIN ".TABLE_PREFIX."templates t2 ON (t.title=t2.title AND t2.sid='1')

					FROM ".TABLE_PREFIX."templates t
LEFT JOIN ".TABLE_PREFIX."templatesets s ON (t.sid=s.sid)
LEFT JOIN ".TABLE_PREFIX."templates t2 ON (t.title=t2.title AND t2.sid='1')

					WHERE t.template LIKE '%".$db->escape_string_like($mybb->input['find'])."%' AND NOT (t.sid = -2 AND (t2.tid) IS NOT NULL)

					WHERE REPLACE(REPLACE(REPLACE(REPLACE(t.template, '\r\n', '\n'), '\r', '\n'), '  ', ''), '\t', '') LIKE '%".$db->escape_string_like($search_string)."%' AND NOT (t.sid = -2 AND (t2.tid) IS NOT NULL)

					ORDER BY t.title ASC
");
if($db->num_rows($query) == 0)

					ORDER BY t.title ASC
");
if($db->num_rows($query) == 0)

Zeile 1166Zeile 1179
	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

	if($admin_options['codepress'] != 0)
{
$page->extra_header .= '

<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js"></script>
<script src="./jscripts/codemirror/addon/search/search.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/search/search.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script>
<script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script>
<link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">

';
}


';
}


Zeile 1311Zeile 1324
		FROM ".TABLE_PREFIX."templates t
LEFT JOIN ".TABLE_PREFIX."templates m ON (m.title=t.title AND m.sid=-2 AND m.version > t.version)
WHERE t.sid > 0 AND m.template != t.template

		FROM ".TABLE_PREFIX."templates t
LEFT JOIN ".TABLE_PREFIX."templates m ON (m.title=t.title AND m.sid=-2 AND m.version > t.version)
WHERE t.sid > 0 AND m.template != t.template

		ORDER BY t.sid ASC, title ASC
");
while($template = $db->fetch_array($query))
{

		ORDER BY t.sid ASC, t.title ASC
");
while($template = $db->fetch_array($query))
{

		$templates[$template['sid']][] = $template;
}


		$templates[$template['sid']][] = $template;
}


Zeile 1322Zeile 1335
	{
if(!$done_set[$sid])
{

	{
if(!$done_set[$sid])
{

			$table->construct_header($templatesets[$sid]['title'], array("colspan" => 2));

			$table->construct_header(htmlspecialchars_uni($templatesets[$sid]['title']), array("colspan" => 2));


$done_set[$sid] = 1;
++$count;


$done_set[$sid] = 1;
++$count;

Zeile 1369Zeile 1382
		admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}


		admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}


	// User clicked no
if($mybb->input['no'])
{
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}


	// User clicked no
if($mybb->input['no'])
{
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");
}


	$plugins->run_hooks("admin_style_template_group_delete");

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

	$plugins->run_hooks("admin_style_template_group_delete");

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

Zeile 1387Zeile 1400
		$plugins->run_hooks("admin_style_template_group_delete_commit");

// Log admin action

		$plugins->run_hooks("admin_style_template_group_delete_commit");

// Log admin action

		log_admin_action($template_group['gid'], htmlspecialchars_uni($template_group['title']));

		log_admin_action($template_group['gid'], $template_group['title']);


flash_message($lang->success_template_group_deleted, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");


flash_message($lang->success_template_group_deleted, 'success');
admin_redirect("index.php?module=style-templates&amp;sid={$sid}");

Zeile 1423Zeile 1436
			admin_redirect("index.php?module=style-templates");
break;
}

			admin_redirect("index.php?module=style-templates");
break;
}

	}

// User clicked no
if($mybb->input['no'])
{

	}

// User clicked no
if($mybb->input['no'])
{

		admin_redirect("index.php?module=style-templates");
}


		admin_redirect("index.php?module=style-templates");
}


Zeile 1511Zeile 1524
			'title' => $lang->find_updated,
'link' => "index.php?module=style-templates&amp;action=find_updated"
);

			'title' => $lang->find_updated,
'link' => "index.php?module=style-templates&amp;action=find_updated"
);

	}

	}


if($mybb->input['sid2'] != -2 && !isset($template_sets[$mybb->input['sid2']]))


if($mybb->input['sid2'] != -2 && !isset($template_sets[$mybb->input['sid2']]))

	{

	{

		flash_message($lang->error_invalid_input, 'error');
admin_redirect("index.php?module=style-templates");

		flash_message($lang->error_invalid_input, 'error');
admin_redirect("index.php?module=style-templates");

	}

	}


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


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





	$sub_tabs['diff_report'] = array(
'title' => $lang->diff_report,
'link' => "index.php?module=style-templates&amp;action=diff_report&amp;title=".$db->escape_string($mybb->input['title'])."&amp;from=".htmlspecialchars_uni($mybb->input['from'])."sid1=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&amp;sid2=".$mybb->get_input('sid2', MyBB::INPUT_INT),
'description' => $lang->diff_report_desc
);

	$sub_tabs['diff_report'] = array(
'title' => $lang->diff_report,
'link' => "index.php?module=style-templates&amp;action=diff_report&amp;title=".$db->escape_string($mybb->input['title'])."&amp;from=".htmlspecialchars_uni($mybb->input['from'])."sid1=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&amp;sid2=".$mybb->get_input('sid2', MyBB::INPUT_INT),
'description' => $lang->diff_report_desc
);





	$plugins->run_hooks("admin_style_templates_diff_report");

$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid1', MyBB::INPUT_INT)."'");
$template1 = $db->fetch_array($query);

$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid2', MyBB::INPUT_INT)."'");

	$plugins->run_hooks("admin_style_templates_diff_report");

$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid1', MyBB::INPUT_INT)."'");
$template1 = $db->fetch_array($query);

$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid2', MyBB::INPUT_INT)."'");

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

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

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

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

	{
$sub_tabs['full_edit'] = array(
'title' => $lang->full_edit,

	{
$sub_tabs['full_edit'] = array(
'title' => $lang->full_edit,

Zeile 1726Zeile 1739
		$template_groups[$templategroup['prefix']] = $templategroup;
}


		$template_groups[$templategroup['prefix']] = $templategroup;
}


 
	/**
* @param array $a
* @param array $b
*
* @return int
*/

	function sort_template_groups($a, $b)
{
return strcasecmp($a['title'], $b['title']);

	function sort_template_groups($a, $b)
{
return strcasecmp($a['title'], $b['title']);

Zeile 1850Zeile 1869
			$table->construct_cell("<a href=\"index.php?module=style-templates&amp;sid={$sid}{$group['expand_str']}#group_{$group['gid']}\">{$expand}</a>", array("class" => "align_center"));
$table->construct_row(array("class" => "alt_row", "id" => "group_".$group['gid'], "name" => "group_".$group['gid']));


			$table->construct_cell("<a href=\"index.php?module=style-templates&amp;sid={$sid}{$group['expand_str']}#group_{$group['gid']}\">{$expand}</a>", array("class" => "align_center"));
$table->construct_row(array("class" => "alt_row", "id" => "group_".$group['gid'], "name" => "group_".$group['gid']));


			if(isset($group['templates']) && count($group['templates']) > 0)

			if(isset($group['templates']) && is_array($group['templates']) && count($group['templates']) > 0)

			{
$templates = $group['templates'];
ksort($templates);

			{
$templates = $group['templates'];
ksort($templates);

Zeile 1984Zeile 2003

$actions = $popup->fetch();
}


$actions = $popup->fetch();
}

 

$set['title'] = htmlspecialchars_uni($set['title']);


$table->construct_cell("<strong><a href=\"index.php?module=style-templates&amp;sid={$set['sid']}\">{$set['title']}</a></strong><br /><small>{$used_by_note}</small>");
$table->construct_cell($actions, array("class" => "align_center"));


$table->construct_cell("<strong><a href=\"index.php?module=style-templates&amp;sid={$set['sid']}\">{$set['title']}</a></strong><br /><small>{$used_by_note}</small>");
$table->construct_cell($actions, array("class" => "align_center"));