Vergleich admin/modules/style/themes.php - 1.8.9 - 1.8.21

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

$table->construct_cell("<img src=\"https://community.mybb.com/{$result['thumbnail']['value']}\" alt=\"{$lang->theme_thumbnail}\" title=\"{$lang->theme_thumbnail}\"/>", array("class" => "align_center", "width" => 100));
$table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} {$result['author']['value']}</small></i>");


$table->construct_cell("<img src=\"https://community.mybb.com/{$result['thumbnail']['value']}\" alt=\"{$lang->theme_thumbnail}\" title=\"{$lang->theme_thumbnail}\"/>", array("class" => "align_center", "width" => 100));
$table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} {$result['author']['value']}</small></i>");

			$table->construct_cell("<strong><a href=\"https://community.mybb.com/{$result['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));

			$table->construct_cell("<strong><a href=\"https://community.mybb.com/{$result['download_url']['value']}\" target=\"_blank\" rel=\"noopener\">{$lang->download}</a></strong>", array("class" => "align_center"));

			$table->construct_row();
}
}

			$table->construct_row();
}
}

Zeile 243Zeile 243
	echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n";
echo "<script type=\"text/javascript\">
var form = $(\"#search_form\");

	echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n";
echo "<script type=\"text/javascript\">
var form = $(\"#search_form\");

		form.submit(function()

		form.on('submit', function()

		{
var search = $('#search_keywords');
if(search.val() == '' || search.val() == '{$lang->search_for_themes}')
{

		{
var search = $('#search_keywords');
if(search.val() == '' || search.val() == '{$lang->search_for_themes}')
{

				search.focus();

				search.trigger('focus');

				return false;
}
});

var search = $('#search_keywords');

				return false;
}
});

var search = $('#search_keywords');

		search.focus(function()

		search.on('focus', function()

		{
var search_focus = $(this);
if(search_focus.val() == '{$lang->search_for_themes}')

		{
var search_focus = $(this);
if(search_focus.val() == '{$lang->search_for_themes}')

Zeile 262Zeile 262
				search_focus.removeClass('search_default');
search_focus.val('');
}

				search_focus.removeClass('search_default');
search_focus.val('');
}

		});

search.blur(function()

		}).on('blur', function()



		{
var search_blur = $(this);
if(search_blur.val() == '')

		{
var search_blur = $(this);
if(search_blur.val() == '')

Zeile 284Zeile 282
	echo $search->end();

// Recommended themes = Default; Otherwise search results & pagination

	echo $search->end();

// Recommended themes = Default; Otherwise search results & pagination

	if($mybb->request_method == "post")
{
$table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->browse_results_for_mybb, $mybb->version));
}

	if($mybb->request_method == "post")
{
$table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\" rel=\"noopener\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->browse_results_for_mybb, $mybb->version));
}

	else
{

	else
{

		$table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->recommended_themes_for_mybb, $mybb->version));

		$table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\" rel=\"noopener\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->recommended_themes_for_mybb, $mybb->version));

	}

	}





	echo "<br />".draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&amp;action=browse{$keywords}&amp;page={page}");

	echo "<br />".draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&amp;action=browse{$keywords}&amp;page={page}");





	$page->output_footer();
}

	$page->output_footer();
}





if($mybb->input['action'] == "import")
{
$plugins->run_hooks("admin_style_themes_import");

if($mybb->input['action'] == "import")
{
$plugins->run_hooks("admin_style_themes_import");

Zeile 307Zeile 305
		if(!$_FILES['local_file'] && !$mybb->input['url'])
{
$errors[] = $lang->error_missing_url;

		if(!$_FILES['local_file'] && !$mybb->input['url'])
{
$errors[] = $lang->error_missing_url;

		}

		}


if(!$errors)
{


if(!$errors)
{

Zeile 388Zeile 386
				if($theme_id > -1)
{
$plugins->run_hooks("admin_style_themes_import_commit");

				if($theme_id > -1)
{
$plugins->run_hooks("admin_style_themes_import_commit");





					// Log admin action
log_admin_action($theme_id);


					// Log admin action
log_admin_action($theme_id);


Zeile 418Zeile 416

$query = $db->simple_select("themes", "tid, name");
while($theme = $db->fetch_array($query))


$query = $db->simple_select("themes", "tid, name");
while($theme = $db->fetch_array($query))

	{

	{

		$themes[$theme['tid']] = $theme['name'];
}

$page->add_breadcrumb_item($lang->import_a_theme, "index.php?module=style-themes&amp;action=import");

		$themes[$theme['tid']] = $theme['name'];
}

$page->add_breadcrumb_item($lang->import_a_theme, "index.php?module=style-themes&amp;action=import");





	$page->output_header("{$lang->themes} - {$lang->import_a_theme}");

	$page->output_header("{$lang->themes} - {$lang->import_a_theme}");





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

if($errors)

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

if($errors)

	{

	{

		$page->output_inline_error($errors);

if($mybb->input['import'] == 1)

		$page->output_inline_error($errors);

if($mybb->input['import'] == 1)

Zeile 510Zeile 508
	$form->output_submit_wrapper($buttons);

$form->end();

	$form->output_submit_wrapper($buttons);

$form->end();





	$page->output_footer();
}


	$page->output_footer();
}


Zeile 584Zeile 582
		$inherited_load[] = $mybb->input['tid'];
$inherited_load = array_unique($inherited_load);


		$inherited_load[] = $mybb->input['tid'];
$inherited_load = array_unique($inherited_load);


		$inherited_themes = array();

		$inherited_themes = $theme_stylesheets = array();

		if(count($inherited_load) > 0)
{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");

		if(count($inherited_load) > 0)
{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");

Zeile 592Zeile 590
			{
$inherited_themes[$inherited_theme['tid']] = $inherited_theme['name'];
}

			{
$inherited_themes[$inherited_theme['tid']] = $inherited_theme['name'];
}

		}

$theme_stylesheets = array();

 




		if(count($inherited_load) > 0)
{

 
			$query = $db->simple_select("themestylesheets", "*", "tid IN (".implode(",", $inherited_load).")", array('order_by' => 'tid', 'order_dir' => 'desc'));
while($theme_stylesheet = $db->fetch_array($query))
{

			$query = $db->simple_select("themestylesheets", "*", "tid IN (".implode(",", $inherited_load).")", array('order_by' => 'tid', 'order_dir' => 'desc'));
while($theme_stylesheet = $db->fetch_array($query))
{

Zeile 667Zeile 660
		$plugins->run_hooks("admin_style_themes_export_commit");

// Log admin action

		$plugins->run_hooks("admin_style_themes_export_commit");

// Log admin action

		log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));

		log_admin_action($theme['tid'], $theme['name']);


$theme['name'] = rawurlencode($theme['name']);
header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");


$theme['name'] = rawurlencode($theme['name']);
header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");

Zeile 911Zeile 904
			$plugins->run_hooks("admin_style_themes_add_commit");

// Log admin action

			$plugins->run_hooks("admin_style_themes_add_commit");

// Log admin action

			log_admin_action(htmlspecialchars_uni($mybb->input['name']), $tid);

			log_admin_action($mybb->input['name'], $tid);


flash_message($lang->success_theme_created, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid=".$tid);


flash_message($lang->success_theme_created, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid=".$tid);

Zeile 934Zeile 927
	$form_container = new FormContainer($lang->create_a_theme);
$form_container->output_row($lang->name, $lang->name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->parent_theme, $lang->parent_theme_desc, $form->generate_select_box('tid', $themes, $mybb->input['tid'], array('id' => 'tid')), 'tid');

	$form_container = new FormContainer($lang->create_a_theme);
$form_container->output_row($lang->name, $lang->name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->parent_theme, $lang->parent_theme_desc, $form->generate_select_box('tid', $themes, $mybb->input['tid'], array('id' => 'tid')), 'tid');





	$form_container->end();

	$form_container->end();





	$buttons[] = $form->generate_submit_button($lang->create_new_theme);

$form->output_submit_wrapper($buttons);

	$buttons[] = $form->generate_submit_button($lang->create_new_theme);

$form->output_submit_wrapper($buttons);





	$form->end();

$page->output_footer();
}

	$form->end();

$page->output_footer();
}





if($mybb->input['action'] == "delete")
{
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
$theme = $db->fetch_array($query);

if($mybb->input['action'] == "delete")
{
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
$theme = $db->fetch_array($query);





	// Does the theme not exist? or are we trying to delete the master?
if(!$theme['tid'] || $theme['tid'] == 1)
{
flash_message($lang->error_invalid_theme, 'error');

	// Does the theme not exist? or are we trying to delete the master?
if(!$theme['tid'] || $theme['tid'] == 1)
{
flash_message($lang->error_invalid_theme, 'error');

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

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

	}

// User clicked no

	}

// User clicked no

Zeile 976Zeile 969
			$theme2['stylesheets'] = my_unserialize($theme2['stylesheets']);

if(!$theme2['stylesheets']['inherited'])

			$theme2['stylesheets'] = my_unserialize($theme2['stylesheets']);

if(!$theme2['stylesheets']['inherited'])

			{

			{

				continue;
}


				continue;
}


Zeile 1025Zeile 1018

@rmdir(MYBB_ROOT."cache/themes/theme{$theme['tid']}/");



@rmdir(MYBB_ROOT."cache/themes/theme{$theme['tid']}/");


		$children = make_child_theme_list($theme['tid']);
$child_tid = $children[0];

		$children = (array)make_child_theme_list($theme['tid']);
$child_tids = array();





		if($child_tid != 0)

		foreach($children as $child_tid)

		{

		{

			$db->update_query("themes", array('pid' => $theme['pid']), "tid='{$child_tid}'");









			if($child_tid != 0)
{
$child_tids[] = $child_tid;
}
}

if(!empty($child_tids))
{
$db->update_query("themes", array('pid' => $theme['pid']), "tid IN (".implode(',', $child_tids).")");

		}

$db->delete_query("themes", "tid='{$theme['tid']}'", 1);

		}

$db->delete_query("themes", "tid='{$theme['tid']}'", 1);

Zeile 1038Zeile 1039
		$plugins->run_hooks("admin_style_themes_delete_commit");

// Log admin action

		$plugins->run_hooks("admin_style_themes_delete_commit");

// Log admin action

		log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));

		log_admin_action($theme['tid'], $theme['name']);


flash_message($lang->success_theme_deleted, 'success');
admin_redirect("index.php?module=style-themes");
}
else


flash_message($lang->success_theme_deleted, 'success');
admin_redirect("index.php?module=style-themes");
}
else

	{

	{

		$page->output_confirm_action("index.php?module=style-themes&amp;action=delete&amp;tid={$theme['tid']}", $lang->confirm_theme_deletion);
}
}

		$page->output_confirm_action("index.php?module=style-themes&amp;action=delete&amp;tid={$theme['tid']}", $lang->confirm_theme_deletion);
}
}





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

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

Zeile 1060Zeile 1061
		flash_message($lang->error_invalid_theme, 'error');
admin_redirect("index.php?module=style-themes");
}

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





	$plugins->run_hooks("admin_style_themes_edit");

if($mybb->request_method == "post" && !$mybb->input['do'])

	$plugins->run_hooks("admin_style_themes_edit");

if($mybb->request_method == "post" && !$mybb->input['do'])

	{

	{

		$properties = array(
'templateset' => $mybb->get_input('templateset', MyBB::INPUT_INT),
'editortheme' => $mybb->input['editortheme'],

		$properties = array(
'templateset' => $mybb->get_input('templateset', MyBB::INPUT_INT),
'editortheme' => $mybb->input['editortheme'],

Zeile 1086Zeile 1087

foreach($colors as $color)
{


foreach($colors as $color)
{

				$color = explode("=", $color);

$properties['colors'][$color[0]] = $color[1];








				$color = trim($color);
if(preg_match('/^[a-z0-9]+={1}[a-z0-9]+$/i', $color))
{
$color = explode("=", $color);
$properties['colors'][$color[0]] = $color[1];
}
else
{
$errors[] = $lang->sprintf($lang->error_invalid_color, $color);
}

			}
}


			}
}


Zeile 1150Zeile 1158
		}

if($update_array['pid'])

		}

if($update_array['pid'])

		{

		{

			$query = $db->simple_select("themes", "tid", "tid='".$update_array['pid']."'");
$parent_check = $db->fetch_field($query, "tid");
if(!$parent_check)

			$query = $db->simple_select("themes", "tid", "tid='".$update_array['pid']."'");
$parent_check = $db->fetch_field($query, "tid");
if(!$parent_check)

			{

			{

				$errors[] = $lang->error_invalid_parent_theme;
}
}
if($properties['templateset'])

				$errors[] = $lang->error_invalid_parent_theme;
}
}
if($properties['templateset'])

		{

		{

			$query = $db->simple_select("templatesets", "sid", "sid='".$properties['templateset']."'");
$ts_check = $db->fetch_field($query, "sid");
if(!$ts_check)

			$query = $db->simple_select("templatesets", "sid", "sid='".$properties['templateset']."'");
$ts_check = $db->fetch_field($query, "sid");
if(!$ts_check)

Zeile 1171Zeile 1179
		{
$errors[] = $lang->error_invalid_templateset;
}

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

		if(!$properties['editortheme'] || !file_exists(MYBB_ROOT."jscripts/sceditor/editor_themes/".$properties['editortheme']) || is_dir(MYBB_ROOT."jscripts/sceditor/editor_themes/".$properties['editortheme']))

		if(!$properties['editortheme'] || !file_exists(MYBB_ROOT."jscripts/sceditor/themes/".$properties['editortheme']) || is_dir(MYBB_ROOT."jscripts/sceditor/themes/".$properties['editortheme']))

		{
$errors[] = $lang->error_invalid_editortheme;

		{
$errors[] = $lang->error_invalid_editortheme;

		}


		}


		if(empty($errors))
{
$plugins->run_hooks("admin_style_themes_edit_commit");

		if(empty($errors))
{
$plugins->run_hooks("admin_style_themes_edit_commit");

Zeile 1189Zeile 1197
			}

// Log admin action

			}

// Log admin action

			log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));

			log_admin_action($theme['tid'], $theme['name']);


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


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

			admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
}

			admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
}

	}

// Fetch list of all of the stylesheets for this theme

	}

// Fetch list of all of the stylesheets for this theme

Zeile 1230Zeile 1238
	$inherited_load[] = $mybb->input['tid'];
$inherited_load = array_unique($inherited_load);


	$inherited_load[] = $mybb->input['tid'];
$inherited_load = array_unique($inherited_load);


	$inherited_themes = array();

	$inherited_themes = $theme_stylesheets = array();

	if(count($inherited_load) > 0)
{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");

	if(count($inherited_load) > 0)
{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");

Zeile 1238Zeile 1246
		{
$inherited_themes[$inherited_theme['tid']] = $inherited_theme['name'];
}

		{
$inherited_themes[$inherited_theme['tid']] = $inherited_theme['name'];
}

	}

$theme_stylesheets = array();

 




	if(count($inherited_load) > 0)
{

 
		$query = $db->simple_select("themestylesheets", "*", "", array('order_by' => 'sid DESC, tid', 'order_dir' => 'desc'));
while($theme_stylesheet = $db->fetch_array($query))

		$query = $db->simple_select("themestylesheets", "*", "", array('order_by' => 'sid DESC, tid', 'order_dir' => 'desc'));
while($theme_stylesheet = $db->fetch_array($query))

		{

		{

			if(!isset($theme_stylesheets[$theme_stylesheet['name']]) && in_array($theme_stylesheet['tid'], $inherited_load))
{
$theme_stylesheets[$theme_stylesheet['name']] = $theme_stylesheet;

			if(!isset($theme_stylesheets[$theme_stylesheet['name']]) && in_array($theme_stylesheet['tid'], $inherited_load))
{
$theme_stylesheets[$theme_stylesheet['name']] = $theme_stylesheet;

			}

			}


$theme_stylesheets[$theme_stylesheet['sid']] = $theme_stylesheet['name'];
}


$theme_stylesheets[$theme_stylesheet['sid']] = $theme_stylesheet['name'];
}

Zeile 1274Zeile 1277
				$order = (int)$mybb->input['disporder'][$properties['sid']];

$orders[$properties['name']] = $order;

				$order = (int)$mybb->input['disporder'][$properties['sid']];

$orders[$properties['name']] = $order;

			}
}

asort($orders, SORT_NUMERIC);


			}
}

asort($orders, SORT_NUMERIC);


		// Save the orders in the theme properties
$properties = my_unserialize($theme['properties']);
$properties['disporder'] = $orders;

		// Save the orders in the theme properties
$properties = my_unserialize($theme['properties']);
$properties['disporder'] = $orders;

Zeile 1299Zeile 1302

flash_message($lang->success_stylesheet_order_updated, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");


flash_message($lang->success_stylesheet_order_updated, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

	}


	}


	$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");

$page->output_header("{$lang->themes} - {$lang->stylesheets}");

	$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");

$page->output_header("{$lang->themes} - {$lang->stylesheets}");

Zeile 1344Zeile 1347
	$ordered_stylesheets = array();

foreach($properties['disporder'] as $style_name => $order)

	$ordered_stylesheets = array();

foreach($properties['disporder'] as $style_name => $order)

	{

	{

		foreach($stylesheets as $filename => $style)
{
if(strpos($filename, 'css.php?stylesheet=') !== false)

		foreach($stylesheets as $filename => $style)
{
if(strpos($filename, 'css.php?stylesheet=') !== false)

Zeile 1409Zeile 1412

$inherited .= $sep.$file;
$sep = $lang->comma;


$inherited .= $sep.$file;
$sep = $lang->comma;


++$count;


++$count;

			}
$inherited .= ")</small>";
}

			}
$inherited .= ")</small>";
}

Zeile 1451Zeile 1454

// It's a file:
++$count;


// It's a file:
++$count;

 

$name = htmlspecialchars_uni($name);


if($actions[0] != "global")
{


if($actions[0] != "global")
{

 
					$actions = array_map('htmlspecialchars_uni', $actions);


					$name = "{$name} ({$lang->actions}: ".implode(',', $actions).")";
}


					$name = "{$name} ({$lang->actions}: ".implode(',', $actions).")";
}


Zeile 1560Zeile 1567
	$form_container->output_row($lang->template_set." <em>*</em>", $lang->template_set_desc, $form->generate_select_box('templateset', $options, $properties['templateset'], array('id' => 'templateset')), 'templateset');

$options = array();

	$form_container->output_row($lang->template_set." <em>*</em>", $lang->template_set_desc, $form->generate_select_box('templateset', $options, $properties['templateset'], array('id' => 'templateset')), 'templateset');

$options = array();

	$editor_theme_root = MYBB_ROOT."jscripts/sceditor/editor_themes/";

	$editor_theme_root = MYBB_ROOT."jscripts/sceditor/themes/";

	if($dh = @opendir($editor_theme_root))
{
while($dir = readdir($dh))

	if($dh = @opendir($editor_theme_root))
{
while($dir = readdir($dh))

Zeile 1675Zeile 1682
		if(get_extension($mybb->input['name']) != "css")
{
// Does not end with '.css'

		if(get_extension($mybb->input['name']) != "css")
{
// Does not end with '.css'

			$errors[] = $lang->sprintf($lang->error_missing_stylesheet_extension, $mybb->input['name']);




			$errors[] = $lang->sprintf(
$lang->error_missing_stylesheet_extension,
htmlspecialchars_uni($mybb->input['name'])
);

		}

if(!$errors)
{
// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])

		}

if(!$errors)
{
// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])

			{

			{

				$stylesheet['sid'] = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
}

				$stylesheet['sid'] = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
}





			$attached = array();
if($mybb->input['attach'] == 1)
{

			$attached = array();
if($mybb->input['attach'] == 1)
{

Zeile 1704Zeile 1714
						{
// We have custom actions for attached files
$actions_list = $mybb->input['action_list_'.$attached_id];

						{
// We have custom actions for attached files
$actions_list = $mybb->input['action_list_'.$attached_id];

						}


						}


						if($actions_list)
{
$attached_to .= "?".$actions_list;

						if($actions_list)
{
$attached_to .= "?".$actions_list;

Zeile 1713Zeile 1723

$attached[] = $attached_to;
}


$attached[] = $attached_to;
}

				}

				}

			}
else if($mybb->input['attach'] == 2)
{

			}
else if($mybb->input['attach'] == 2)
{

Zeile 1736Zeile 1746
			if($stylesheet['name'] != $mybb->input['name'])
{
$update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name']));

			if($stylesheet['name'] != $mybb->input['name'])
{
$update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name']));

			}

			}


$db->update_query("themestylesheets", $update_array, "sid='{$stylesheet['sid']}'", 1);



$db->update_query("themestylesheets", $update_array, "sid='{$stylesheet['sid']}'", 1);


Zeile 1765Zeile 1775
			$plugins->run_hooks("admin_style_themes_stylesheet_properties_commit");

// Log admin action

			$plugins->run_hooks("admin_style_themes_stylesheet_properties_commit");

// Log admin action

			log_admin_action($stylesheet['sid'], $mybb->input['name'], $theme['tid'], htmlspecialchars_uni($theme['name']));

			log_admin_action($stylesheet['sid'], $mybb->input['name'], $theme['tid'], $theme['name']);


flash_message($lang->success_stylesheet_properties_updated, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");


flash_message($lang->success_stylesheet_properties_updated, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

Zeile 1860Zeile 1870
			if($actions[0] != "global")
{
$action_list = implode(',', $actions);

			if($actions[0] != "global")
{
$action_list = implode(',', $actions);

			}

			}


if($actions[0] == "global")
{


if($actions[0] == "global")
{

Zeile 1922Zeile 1932
	{
$specific_colors = "<div id=\"attach_2\" class=\"attachs\">";
$specific_colors_option = '<dt><label style="display: block;"><input type="radio" name="attach" value="2" '.$global_checked[3].' class="attachs_check" onclick="checkAction(\'attach\');" style="vertical-align: middle;" /> '.$lang->colors_specific_color.'</label></dt><br />';

	{
$specific_colors = "<div id=\"attach_2\" class=\"attachs\">";
$specific_colors_option = '<dt><label style="display: block;"><input type="radio" name="attach" value="2" '.$global_checked[3].' class="attachs_check" onclick="checkAction(\'attach\');" style="vertical-align: middle;" /> '.$lang->colors_specific_color.'</label></dt><br />';


$specific_color = "
<small>{$lang->colors_add_edit_desc}</small>
<br /><br />
".$form->generate_select_box('color[]', $properties['colors'], $stylesheet['colors'], array('multiple' => true, 'size' => "5\" style=\"width: 200px;"))."
";

$form_container = new FormContainer();
$form_container->output_row("", "", $specific_color);
$specific_colors .= $form_container->end(true)."</div>";
}

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

$(\'.\'+id+\'s_check\').each(function(e, val)
{
if($(this).prop(\'checked\') == true)
{
checked = $(this).val();
}
});
$(\'.\'+id+\'s\').each(function(e)


$specific_color = "
<small>{$lang->colors_add_edit_desc}</small>
<br /><br />
".$form->generate_select_box('color[]', $properties['colors'], $stylesheet['colors'], array('multiple' => true, 'size' => "5\" style=\"width: 200px;"))."
";

$form_container = new FormContainer();
$form_container->output_row("", "", $specific_color);
$specific_colors .= $form_container->end(true)."</div>";
}

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

$(\'.\'+id+\'s_check\').each(function(e, val)
{
if($(this).prop(\'checked\') == true)
{
checked = $(this).val();
}
});
$(\'.\'+id+\'s\').each(function(e)

		{
$(this).hide();
});

		{
$(this).hide();
});

Zeile 1983Zeile 1993

echo <<<EOF



echo <<<EOF


	<script type="text/javascript" src="./jscripts/theme_properties.js"></script>

	<script type="text/javascript" src="./jscripts/theme_properties.js?ver=1821"></script>

	<script type="text/javascript">
<!---
themeProperties.setup('{$count}');

	<script type="text/javascript">
<!---
themeProperties.setup('{$count}');

Zeile 2031Zeile 2041
	if($mybb->request_method == "post")
{
$sid = $stylesheet['sid'];

	if($mybb->request_method == "post")
{
$sid = $stylesheet['sid'];





		// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])
{

		// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])
{

Zeile 2070Zeile 2080
		// Now we have the new stylesheet, save it
$updated_stylesheet = array(
"cachefile" => $db->escape_string($stylesheet['name']),

		// Now we have the new stylesheet, save it
$updated_stylesheet = array(
"cachefile" => $db->escape_string($stylesheet['name']),

			"stylesheet" => $db->escape_string(unfix_css_urls($new_stylesheet)),

			"stylesheet" => $db->escape_string($new_stylesheet),

			"lastmodified" => TIME_NOW
);
$db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");

			"lastmodified" => TIME_NOW
);
$db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");

Zeile 2115Zeile 2125
		// Need to refetch new stylesheet as it was modified
$query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'");
$stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');

		// Need to refetch new stylesheet as it was modified
$query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'");
$stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');

	}

	}


$css_array = css_to_array($stylesheet['stylesheet']);
$selector_list = get_selectors_as_options($css_array, $mybb->input['selector']);


$css_array = css_to_array($stylesheet['stylesheet']);
$selector_list = get_selectors_as_options($css_array, $mybb->input['selector']);

Zeile 2142Zeile 2152
	$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=simple");

$page->output_header("{$lang->themes} - {$lang->edit_stylesheets}");

	$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=simple");

$page->output_header("{$lang->themes} - {$lang->edit_stylesheets}");





	// If the stylesheet and theme do not match, we must be editing something that is inherited
if($this_stylesheet['inherited'][$stylesheet['name']])
{

	// If the stylesheet and theme do not match, we must be editing something that is inherited
if($this_stylesheet['inherited'][$stylesheet['name']])
{

Zeile 2157Zeile 2167
		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent), "ajax_alert");

		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent), "ajax_alert");

		}

		}

	}

$sub_tabs['edit_stylesheet'] = array(

	}

$sub_tabs['edit_stylesheet'] = array(

Zeile 2181Zeile 2191
	echo $form->generate_hidden_field("file", htmlspecialchars_uni($mybb->input['file']))."\n";

echo "{$lang->selector}: <select id=\"selector\" name=\"selector\">\n{$selector_list}</select> <span id=\"mini_spinner\">".$form->generate_submit_button($lang->go)."</span><br /><br />\n";

	echo $form->generate_hidden_field("file", htmlspecialchars_uni($mybb->input['file']))."\n";

echo "{$lang->selector}: <select id=\"selector\" name=\"selector\">\n{$selector_list}</select> <span id=\"mini_spinner\">".$form->generate_submit_button($lang->go)."</span><br /><br />\n";





	$form->end();

// Haven't chosen a selector to edit, show the first one from the stylesheet
if(!$mybb->input['selector'])

	$form->end();

// Haven't chosen a selector to edit, show the first one from the stylesheet
if(!$mybb->input['selector'])

	{

	{

		reset($css_array);
uasort($css_array, "css_selectors_sort_cmp");
$selector = key($css_array);
$editable_selector = $css_array[$selector];

		reset($css_array);
uasort($css_array, "css_selectors_sort_cmp");
$selector = key($css_array);
$editable_selector = $css_array[$selector];

	}

	}

	// Show a specific selector
else
{
$editable_selector = $css_array[$mybb->input['selector']];
$selector = $mybb->input['selector'];

	// Show a specific selector
else
{
$editable_selector = $css_array[$mybb->input['selector']];
$selector = $mybb->input['selector'];

	}


	}


	// Get the properties from this item
$properties = parse_css_properties($editable_selector['values']);


	// Get the properties from this item
$properties = parse_css_properties($editable_selector['values']);


Zeile 2248Zeile 2258
	echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';
echo '<script type="text/javascript">


	echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';
echo '<script type="text/javascript">


$(document).ready(function() {

$(function() {

//<![CDATA[
ThemeSelector.init("./index.php?module=style-themes&action=xmlhttp_stylesheet", "./index.php?module=style-themes&action=edit_stylesheet", $("#selector"), $("#stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("#selector_form"), "'.$mybb->input['tid'].'");
lang.saving = "'.$lang->saving.'";

//<![CDATA[
ThemeSelector.init("./index.php?module=style-themes&action=xmlhttp_stylesheet", "./index.php?module=style-themes&action=edit_stylesheet", $("#selector"), $("#stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("#selector_form"), "'.$mybb->input['tid'].'");
lang.saving = "'.$lang->saving.'";

Zeile 2260Zeile 2270

$page->output_footer();
}


$page->output_footer();
}





if($mybb->input['action'] == "edit_stylesheet" && $mybb->input['mode'] == "advanced")

if($mybb->input['action'] == "edit_stylesheet" && $mybb->input['mode'] == "advanced")

{
// Fetch the theme we want to edit this stylesheet in
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
$theme = $db->fetch_array($query);

if(!$theme['tid'] || $theme['tid'] == 1)
{
flash_message($lang->error_invalid_theme, 'error');
admin_redirect("index.php?module=style-themes");
}

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");

$parent_list = make_parent_theme_list($theme['tid']);
$parent_list = implode(',', $parent_list);
if(!$parent_list)
{
$parent_list = 1;
}

$query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1));

{
// Fetch the theme we want to edit this stylesheet in
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
$theme = $db->fetch_array($query);

if(!$theme['tid'] || $theme['tid'] == 1)
{
flash_message($lang->error_invalid_theme, 'error');
admin_redirect("index.php?module=style-themes");
}

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");

$parent_list = make_parent_theme_list($theme['tid']);
$parent_list = implode(',', $parent_list);
if(!$parent_list)
{
$parent_list = 1;
}

$query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1));

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

// Does the theme not exist?

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

// Does the theme not exist?

Zeile 2298Zeile 2308

// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])


// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['tid'])

		{

		{

			$sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
}

// Now we have the new stylesheet, save it
$updated_stylesheet = array(
"cachefile" => $db->escape_string($stylesheet['name']),

			$sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
}

// Now we have the new stylesheet, save it
$updated_stylesheet = array(
"cachefile" => $db->escape_string($stylesheet['name']),

			"stylesheet" => $db->escape_string(unfix_css_urls($mybb->input['stylesheet'])),

			"stylesheet" => $db->escape_string($mybb->input['stylesheet']),

			"lastmodified" => TIME_NOW
);
$db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");

			"lastmodified" => TIME_NOW
);
$db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");

Zeile 2315Zeile 2325
		{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1);
}

		{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1);
}





		// Update the CSS file list for this theme
update_theme_stylesheet_list($theme['tid']);

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced_commit");

		// Update the CSS file list for this theme
update_theme_stylesheet_list($theme['tid']);

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced_commit");





		// Log admin action
log_admin_action(htmlspecialchars_uni($theme['name']), $stylesheet['name']);

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

		// Log admin action
log_admin_action(htmlspecialchars_uni($theme['name']), $stylesheet['name']);

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





		if(!$mybb->input['save_close'])
{
admin_redirect("index.php?module=style-themes&action=edit_stylesheet&file=".htmlspecialchars_uni($stylesheet['name'])."&tid={$theme['tid']}&mode=advanced");

		if(!$mybb->input['save_close'])
{
admin_redirect("index.php?module=style-themes&action=edit_stylesheet&file=".htmlspecialchars_uni($stylesheet['name'])."&tid={$theme['tid']}&mode=advanced");

		}
else

		}
else

		{
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

		{
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

		}
}


		}
}


	// Fetch list of all of the stylesheets for this theme
$stylesheets = fetch_theme_stylesheets($theme);
$this_stylesheet = $stylesheets[$stylesheet['name']];
unset($stylesheets);

	// Fetch list of all of the stylesheets for this theme
$stylesheets = fetch_theme_stylesheets($theme);
$this_stylesheet = $stylesheets[$stylesheet['name']];
unset($stylesheets);





	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">
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<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?ver=1808"></script>

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<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=1821"></script>

';

';

	}

	}


$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=advanced");


$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=advanced");

Zeile 2368Zeile 2378

// Show inherited warning
if($stylesheet['tid'] == 1)


// Show inherited warning
if($stylesheet['tid'] == 1)

		{

		{

			$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent));

			$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent));

		}

		}

		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent));

		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent));

		}
}

		}
}


$sub_tabs['edit_stylesheet'] = array(
'title' => $lang->edit_stylesheet_simple_mode,


$sub_tabs['edit_stylesheet'] = array(
'title' => $lang->edit_stylesheet_simple_mode,

Zeile 2482Zeile 2492
		$plugins->run_hooks("admin_style_themes_delete_stylesheet_commit");

// Log admin action

		$plugins->run_hooks("admin_style_themes_delete_stylesheet_commit");

// Log admin action

		log_admin_action($stylesheet['sid'], $stylesheet['name'], $theme['tid'], htmlspecialchars_uni($theme['name']));

		log_admin_action($stylesheet['sid'], $stylesheet['name'], $theme['tid'], $theme['name']);


flash_message($lang->success_stylesheet_deleted, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");


flash_message($lang->success_stylesheet_deleted, 'success');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

Zeile 2542Zeile 2552
			{
// Custom stylesheet
$stylesheet = $mybb->input['stylesheet'];

			{
// Custom stylesheet
$stylesheet = $mybb->input['stylesheet'];

			}

			}


$attached = array();



$attached = array();


Zeile 2610Zeile 2620
			$plugins->run_hooks("admin_style_themes_add_stylesheet_commit");

// Log admin action

			$plugins->run_hooks("admin_style_themes_add_stylesheet_commit");

// Log admin action

			log_admin_action($sid, $mybb->input['name'], $theme['tid'], htmlspecialchars_uni($theme['name']));

			log_admin_action($sid, $mybb->input['name'], $theme['tid'], $theme['name']);


flash_message($lang->success_stylesheet_added, 'success');
admin_redirect("index.php?module=style-themes&action=edit_stylesheet&tid={$mybb->input['tid']}&sid={$sid}&file=".urlencode($mybb->input['name']));


flash_message($lang->success_stylesheet_added, 'success');
admin_redirect("index.php?module=style-themes&action=edit_stylesheet&tid={$mybb->input['tid']}&sid={$sid}&file=".urlencode($mybb->input['name']));

Zeile 2620Zeile 2630
	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">
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js"></script>
<script src="./jscripts/codemirror/mode/css/css.js"></script>
<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?ver=1808"></script>

<link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet">
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet">
<script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script>
<script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script>
<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=1821"></script>

';
}

$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item($lang->add_stylesheet);
$properties = my_unserialize($theme['properties']);

';
}

$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item($lang->add_stylesheet);
$properties = my_unserialize($theme['properties']);





	$page->output_header("{$lang->themes} - {$lang->add_stylesheet}");

$sub_tabs['edit_stylesheets'] = array(

	$page->output_header("{$lang->themes} - {$lang->add_stylesheet}");

$sub_tabs['edit_stylesheets'] = array(

Zeile 2891Zeile 2901
	}

echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';

	}

echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';

	echo '<script type="text/javascript" src="./jscripts/theme_properties.js"></script>';

	echo '<script type="text/javascript" src="./jscripts/theme_properties.js?ver=1821"></script>';

	echo '<script type="text/javascript">
$(function() {
//<![CDATA[

	echo '<script type="text/javascript">
$(function() {
//<![CDATA[

Zeile 2934Zeile 2944
	$plugins->run_hooks("admin_style_themes_set_default_commit");

// Log admin action

	$plugins->run_hooks("admin_style_themes_set_default_commit");

// Log admin action

	log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));

	log_admin_action($theme['tid'], $theme['name']);


flash_message($lang->success_theme_set_default, 'success');
admin_redirect("index.php?module=style-themes");


flash_message($lang->success_theme_set_default, 'success');
admin_redirect("index.php?module=style-themes");

Zeile 2969Zeile 2979
		$plugins->run_hooks("admin_style_themes_force_commit");

$db->update_query("users", $updated_users);

		$plugins->run_hooks("admin_style_themes_force_commit");

$db->update_query("users", $updated_users);

 

// The theme has to be accessible to all usergroups in order to force on all users
if($theme['allowedgroups'] !== "all")
{
$db->update_query("themes", array("allowedgroups" => "all"), "tid='{$theme['tid']}'");
}


// Log admin action


// Log admin action

		log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));

		log_admin_action($theme['tid'], $theme['name']);


flash_message($lang->success_theme_forced, 'success');
admin_redirect("index.php?module=style-themes");


flash_message($lang->success_theme_forced, 'success');
admin_redirect("index.php?module=style-themes");