Vergleich admin/modules/style/themes.php - 1.8.20 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 168Zeile 168
	// Convert to mods site version codes
$search_version = ($major_version_code/100).'x';


	// Convert to mods site version codes
$search_version = ($major_version_code/100).'x';


	$contents = fetch_remote_file("https://community.mybb.com/xmlbrowse.php?type=themes&version={$search_version}{$keywords}{$url_page}", $post_data);

	$contents = fetch_remote_file("https://community.mybb.com/xmlbrowse.php?api=2&type=themes&version={$search_version}{$keywords}{$url_page}", $post_data);


if(!$contents)
{


if(!$contents)
{

Zeile 208Zeile 208
			$result['thumbnail']['value'] = htmlspecialchars_uni($result['thumbnail']['value']);
$result['name']['value'] = htmlspecialchars_uni($result['name']['value']);
$result['description']['value'] = htmlspecialchars_uni($result['description']['value']);

			$result['thumbnail']['value'] = htmlspecialchars_uni($result['thumbnail']['value']);
$result['name']['value'] = htmlspecialchars_uni($result['name']['value']);
$result['description']['value'] = htmlspecialchars_uni($result['description']['value']);

			$result['author']['value'] = $post_parser->parse_message($result['author']['value'], array(
'allow_html' => true
)
);

			$result['author']['url']['value'] = htmlspecialchars_uni($result['author']['url']['value']);
$result['author']['name']['value'] = htmlspecialchars_uni($result['author']['name']['value']);



			$result['download_url']['value'] = htmlspecialchars_uni(html_entity_decode($result['download_url']['value']));

$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));

			$result['download_url']['value'] = htmlspecialchars_uni(html_entity_decode($result['download_url']['value']));

$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>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} <a href=\"{$result['author']['url']['value']}\" target=\"_blank\" rel=\"noopener\">{$result['author']['name']['value']}</a></small></i>");

			$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();
}
}

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

			$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();
}
}

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

	{

	{

		$table->construct_cell($lang->error_no_results_found, array("colspan" => 3));
$table->construct_row();
}

		$table->construct_cell($lang->error_no_results_found, array("colspan" => 3));
$table->construct_row();
}

Zeile 233Zeile 231
	{
$default_class = '';
$value = htmlspecialchars_uni($mybb->input['keywords']);

	{
$default_class = '';
$value = htmlspecialchars_uni($mybb->input['keywords']);

	}

	}

	else
{
$default_class = "search_default";

	else
{
$default_class = "search_default";

Zeile 243Zeile 241
	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}')

			{

			{

				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 473Zeile 469
		if($(\'#\'+id+\'_\'+checked))
{
$(\'#\'+id+\'_\'+checked).show();

		if($(\'#\'+id+\'_\'+checked))
{
$(\'#\'+id+\'_\'+checked).show();

		}
}

		}
}

</script>
<dl style="margin-top: 0; margin-bottom: 0; width: 35%;">
<dt><label style="display: block;"><input type="radio" name="import" value="0" '.$import_checked[1].' class="imports_check" onclick="checkAction(\'import\');" style="vertical-align: middle;" /> '.$lang->local_file.'</label></dt>

</script>
<dl style="margin-top: 0; margin-bottom: 0; width: 35%;">
<dt><label style="display: block;"><input type="radio" name="import" value="0" '.$import_checked[1].' class="imports_check" onclick="checkAction(\'import\');" style="vertical-align: middle;" /> '.$lang->local_file.'</label></dt>

Zeile 560Zeile 556
		foreach($file_stylesheets as $file => $action_stylesheet)
{
if($file == 'inherited' || !is_array($action_stylesheet))

		foreach($file_stylesheets as $file => $action_stylesheet)
{
if($file == 'inherited' || !is_array($action_stylesheet))

			{

			{

				continue;
}

foreach($action_stylesheet as $action => $style)

				continue;
}

foreach($action_stylesheet as $action => $style)

			{

			{

				foreach($style as $stylesheet)
{
$stylesheets[$stylesheet]['applied_to'][$file][] = $action;

				foreach($style as $stylesheet)
{
$stylesheets[$stylesheet]['applied_to'][$file][] = $action;

Zeile 577Zeile 573
							$inherited_load[] = $value;
}
}

							$inherited_load[] = $value;
}
}

				}
}
}


				}
}
}


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


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


Zeile 600Zeile 596
				{
$theme_stylesheets[$theme_stylesheet['cachefile']] = $theme_stylesheet;
$theme_stylesheets[$theme_stylesheet['sid']] = $theme_stylesheet['cachefile'];

				{
$theme_stylesheets[$theme_stylesheet['cachefile']] = $theme_stylesheet;
$theme_stylesheets[$theme_stylesheet['sid']] = $theme_stylesheet['cachefile'];

				}
}
}

				}
}
}


$xml .= "\t<stylesheets>\r\n";
foreach($stylesheets as $filename => $style)
{
if(strpos($filename, 'css.php?stylesheet=') !== false)


$xml .= "\t<stylesheets>\r\n";
foreach($stylesheets as $filename => $style)
{
if(strpos($filename, 'css.php?stylesheet=') !== false)

			{

			{

				$style['sid'] = (int)str_replace('css.php?stylesheet=', '', $filename);
$filename = $theme_stylesheets[$style['sid']];
}
else

				$style['sid'] = (int)str_replace('css.php?stylesheet=', '', $filename);
$filename = $theme_stylesheets[$style['sid']];
}
else

			{

			{

				$filename = basename($filename);
$style['sid'] = $theme_stylesheets[$filename]['sid'];

				$filename = basename($filename);
$style['sid'] = $theme_stylesheets[$filename]['sid'];

			}

$style['tid'] = $theme_stylesheets[$filename]['tid'];


			}

$style['tid'] = $theme_stylesheets[$filename]['tid'];


			if($mybb->input['custom_theme'] == 1 && $style['tid'] != $mybb->input['tid'])
{
continue;

			if($mybb->input['custom_theme'] == 1 && $style['tid'] != $mybb->input['tid'])
{
continue;

			}


			}


			// Has the file on the file system been modified?
resync_stylesheet($theme_stylesheets[$filename]);

$style['sid'] = $theme_stylesheets[$filename]['sid'];

			// Has the file on the file system been modified?
resync_stylesheet($theme_stylesheets[$filename]);

$style['sid'] = $theme_stylesheets[$filename]['sid'];





			$attachedto = $theme_stylesheets[$filename]['attachedto'];
$stylesheet = $theme_stylesheets[$filename]['stylesheet'];
$stylesheet = str_replace(']]>', ']]]]><![CDATA[>', $stylesheet);

			$attachedto = $theme_stylesheets[$filename]['attachedto'];
$stylesheet = $theme_stylesheets[$filename]['stylesheet'];
$stylesheet = str_replace(']]>', ']]]]><![CDATA[>', $stylesheet);

Zeile 640Zeile 636
			}

$filename = $theme_stylesheets[$filename]['name'];

			}

$filename = $theme_stylesheets[$filename]['name'];





			$xml .= "\t\t<stylesheet name=\"{$filename}\" {$attachedto}version=\"{$mybb->version_code}\"><![CDATA[{$stylesheet}]]>\r\n\t\t</stylesheet>\r\n";

			$xml .= "\t\t<stylesheet name=\"{$filename}\" {$attachedto}version=\"{$mybb->version_code}\"><![CDATA[{$stylesheet}]]>\r\n\t\t</stylesheet>\r\n";





		}
$xml .= "\t</stylesheets>\r\n";

		}
$xml .= "\t</stylesheets>\r\n";





		if($mybb->input['include_templates'] != 0)
{
$xml .= "\t<templates>\r\n";

		if($mybb->input['include_templates'] != 0)
{
$xml .= "\t<templates>\r\n";

Zeile 679Zeile 675
	$page->add_breadcrumb_item($lang->export_theme, "index.php?module=style-themes&amp;action=export");

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

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

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


$sub_tabs['edit_stylesheets'] = array(
'title' => $lang->edit_stylesheets,
'link' => "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}",
);

$sub_tabs['add_stylesheet'] = array(
'title' => $lang->add_stylesheet,
'link' => "index.php?module=style-themes&amp;action=add_stylesheet&amp;tid={$mybb->input['tid']}",
);


$sub_tabs['edit_stylesheets'] = array(
'title' => $lang->edit_stylesheets,
'link' => "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}",
);

$sub_tabs['add_stylesheet'] = array(
'title' => $lang->add_stylesheet,
'link' => "index.php?module=style-themes&amp;action=add_stylesheet&amp;tid={$mybb->input['tid']}",
);


$sub_tabs['export_theme'] = array(
'title' => $lang->export_theme,
'link' => "index.php?module=style-themes&amp;action=export&amp;tid={$mybb->input['tid']}",
'description' => $lang->export_theme_desc


$sub_tabs['export_theme'] = array(
'title' => $lang->export_theme,
'link' => "index.php?module=style-themes&amp;action=export&amp;tid={$mybb->input['tid']}",
'description' => $lang->export_theme_desc

	);


	);


	$sub_tabs['duplicate_theme'] = array(
'title' => $lang->duplicate_theme,
'link' => "index.php?module=style-themes&amp;action=duplicate&amp;tid={$mybb->input['tid']}",

	$sub_tabs['duplicate_theme'] = array(
'title' => $lang->duplicate_theme,
'link' => "index.php?module=style-themes&amp;action=duplicate&amp;tid={$mybb->input['tid']}",

Zeile 721Zeile 717
	$buttons[] = $form->generate_submit_button($lang->export_theme);

$form->output_submit_wrapper($buttons);

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

$form->output_submit_wrapper($buttons);





	$form->end();

$page->output_footer();

	$form->end();

$page->output_footer();

Zeile 731Zeile 727
{
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
$theme = $db->fetch_array($query);

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





	// Does the theme not exist?
if(!$theme['tid'])
{

	// Does the theme not exist?
if(!$theme['tid'])
{

Zeile 859Zeile 855
	else
{
$mybb->input['duplicate_templates'] = true;

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

	}


	}


	$form = new Form("index.php?module=style-themes&amp;action=duplicate&amp;tid={$theme['tid']}", "post");

$form_container = new FormContainer($lang->duplicate_theme);
$form_container->output_row($lang->new_name, $lang->new_name_duplicate_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->advanced_options, "", $form->generate_check_box('duplicate_templates', '1', $lang->duplicate_templates, array('checked' => $mybb->input['duplicate_templates'], 'id' => 'duplicate_templates'))."<br /><small>{$lang->duplicate_templates_desc}</small>");

	$form = new Form("index.php?module=style-themes&amp;action=duplicate&amp;tid={$theme['tid']}", "post");

$form_container = new FormContainer($lang->duplicate_theme);
$form_container->output_row($lang->new_name, $lang->new_name_duplicate_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->advanced_options, "", $form->generate_check_box('duplicate_templates', '1', $lang->duplicate_templates, array('checked' => $mybb->input['duplicate_templates'], 'id' => 'duplicate_templates'))."<br /><small>{$lang->duplicate_templates_desc}</small>");





	$form_container->end();

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

	$form_container->end();

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

Zeile 877Zeile 873

$page->output_footer();
}


$page->output_footer();
}





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

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

Zeile 887Zeile 883
	{
$themes[$theme['tid']] = $theme['name'];
}

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





	if($mybb->request_method == "post")
{
if(!$mybb->input['name'])
{
$errors[] = $lang->error_missing_name;

	if($mybb->request_method == "post")
{
if(!$mybb->input['name'])
{
$errors[] = $lang->error_missing_name;

		}

		}

		else if(in_array($mybb->input['name'], $themes))
{
$errors[] = $lang->error_theme_already_exists;
}

		else if(in_array($mybb->input['name'], $themes))
{
$errors[] = $lang->error_theme_already_exists;
}





		if(!$errors)
{
$tid = build_new_theme($mybb->input['name'], null, $mybb->input['tid']);

		if(!$errors)
{
$tid = build_new_theme($mybb->input['name'], null, $mybb->input['tid']);





			$plugins->run_hooks("admin_style_themes_add_commit");

			$plugins->run_hooks("admin_style_themes_add_commit");


// Log admin action


// Log admin action

			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);
}

			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);
}

	}

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


	}

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


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

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





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

if($errors)

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

if($errors)

	{

	{

		$page->output_inline_error($errors);
}

		$page->output_inline_error($errors);
}





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

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





	$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');

Zeile 947Zeile 943
	$theme = $db->fetch_array($query);

// Does the theme not exist? or are we trying to delete the master?

	$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');

	if(!$theme['tid'] || $theme['tid'] == 1)
{
flash_message($lang->error_invalid_theme, 'error');

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

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

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

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

	{

	{

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

$plugins->run_hooks("admin_style_themes_delete");

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

$plugins->run_hooks("admin_style_themes_delete");





	if($mybb->request_method == "post")
{
$inherited_theme_cache = array();

	if($mybb->request_method == "post")
{
$inherited_theme_cache = array();

Zeile 971Zeile 967
			$theme2['stylesheets'] = my_unserialize($theme2['stylesheets']);

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

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

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

			{

			{

				continue;
}


				continue;
}


Zeile 990Zeile 986
					if(strpos($filepath, "cache/themes/theme{$theme['tid']}") !== false)
{
$inherited_stylesheets = true;

					if(strpos($filepath, "cache/themes/theme{$theme['tid']}") !== false)
{
$inherited_stylesheets = true;

					}
}
}

					}
}
}

		}

if($inherited_stylesheets == true)

		}

if($inherited_stylesheets == true)

Zeile 1003Zeile 999

$query = $db->simple_select("themestylesheets", "cachefile", "tid='{$theme['tid']}'");
while($cachefile = $db->fetch_array($query))


$query = $db->simple_select("themestylesheets", "cachefile", "tid='{$theme['tid']}'");
while($cachefile = $db->fetch_array($query))

		{

		{

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

$filename_min = str_replace('.css', '.min.css', $cachefile['cachefile']);

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

$filename_min = str_replace('.css', '.min.css', $cachefile['cachefile']);

Zeile 1019Zeile 1015
		$db->update_query("users", array('style' => 0), "style='{$theme['tid']}'");

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

		$db->update_query("users", array('style' => 0), "style='{$theme['tid']}'");

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





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


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


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

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

$plugins->run_hooks("admin_style_themes_delete_commit");

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

$plugins->run_hooks("admin_style_themes_delete_commit");

Zeile 1121Zeile 1117
		if(is_array($mybb->input['allowedgroups']))
{
foreach($mybb->input['allowedgroups'] as $gid)

		if(is_array($mybb->input['allowedgroups']))
{
foreach($mybb->input['allowedgroups'] as $gid)

			{

			{

				if($gid == "all")
{
$allowedgroups = "all";

				if($gid == "all")
{
$allowedgroups = "all";

Zeile 1132Zeile 1128
			}
}
if(is_array($allowedgroups))

			}
}
if(is_array($allowedgroups))

		{

		{

			$allowedgroups = implode(",", $allowedgroups);
}


			$allowedgroups = implode(",", $allowedgroups);
}


Zeile 1164Zeile 1160
			$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;
}
}

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

Zeile 1175Zeile 1171
			if(!$ts_check)
{
unset($properties['templateset']);

			if(!$ts_check)
{
unset($properties['templateset']);

			}
}

			}
}

		if(!$properties['templateset'])

		if(!$properties['templateset'])

		{

		{

			$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;
}


Zeile 1192Zeile 1188

$db->update_query("themes", $update_array, "tid='{$theme['tid']}'");
update_theme_stylesheet_list($theme['tid']);


$db->update_query("themes", $update_array, "tid='{$theme['tid']}'");
update_theme_stylesheet_list($theme['tid']);





			if($theme['def'] == 1)
{
$cache->update_default_theme();

			if($theme['def'] == 1)
{
$cache->update_default_theme();

Zeile 1208Zeile 1204

// Fetch list of all of the stylesheets for this theme
$file_stylesheets = my_unserialize($theme['stylesheets']);


// Fetch list of all of the stylesheets for this theme
$file_stylesheets = my_unserialize($theme['stylesheets']);





	$stylesheets = array();
$inherited_load = array();

// Now we loop through the list of stylesheets for each file
foreach($file_stylesheets as $file => $action_stylesheet)

	$stylesheets = array();
$inherited_load = array();

// Now we loop through the list of stylesheets for each file
foreach($file_stylesheets as $file => $action_stylesheet)

	{

	{

		if($file == 'inherited' || !is_array($action_stylesheet))
{
continue;

		if($file == 'inherited' || !is_array($action_stylesheet))
{
continue;

		}


		}


		foreach($action_stylesheet as $action => $style)
{
foreach($style as $stylesheet)

		foreach($action_stylesheet as $action => $style)
{
foreach($style as $stylesheet)

Zeile 1251Zeile 1247

$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;

Zeile 1277Zeile 1273
			if(is_array($properties))
{
$order = (int)$mybb->input['disporder'][$properties['sid']];

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





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

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

Zeile 1287Zeile 1283
		// 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;





		$update_array = array(
"properties" => $db->escape_string(my_serialize($properties))
);

		$update_array = array(
"properties" => $db->escape_string(my_serialize($properties))
);





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

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





		if($theme['def'] == 1)
{
$cache->update_default_theme();

		if($theme['def'] == 1)
{
$cache->update_default_theme();

Zeile 1378Zeile 1374
		{
$filename = basename($filename);
$style['sid'] = $theme_stylesheets[$filename]['sid'];

		{
$filename = basename($filename);
$style['sid'] = $theme_stylesheets[$filename]['sid'];

		}


		}


		// Has the file on the file system been modified?
resync_stylesheet($theme_stylesheets[$filename]);


		// Has the file on the file system been modified?
resync_stylesheet($theme_stylesheets[$filename]);


Zeile 1388Zeile 1384
		$inherited = "";
$inherited_ary = array();
if(is_array($style['inherited']))

		$inherited = "";
$inherited_ary = array();
if(is_array($style['inherited']))

		{

		{

			foreach($style['inherited'] as $tid)
{
if($inherited_themes[$tid])
{
$inherited_ary[$tid] = $inherited_themes[$tid];

			foreach($style['inherited'] as $tid)
{
if($inherited_themes[$tid])
{
$inherited_ary[$tid] = $inherited_themes[$tid];

				}

				}

			}
}

if(!empty($inherited_ary))

			}
}

if(!empty($inherited_ary))

		{

		{

			$inherited = " <small>({$lang->inherited_from}";
$sep = " ";
$inherited_count = count($inherited_ary);
$count = 0;

			$inherited = " <small>({$lang->inherited_from}";
$sep = " ";
$inherited_count = count($inherited_ary);
$count = 0;





			foreach($inherited_ary as $tid => $file)
{
if(isset($applied_to_count) && $count == $applied_to_count && $count != 0)

			foreach($inherited_ary as $tid => $file)
{
if(isset($applied_to_count) && $count == $applied_to_count && $count != 0)

Zeile 1421Zeile 1417
		}

if(is_array($style['applied_to']) && (!isset($style['applied_to']['global']) || $style['applied_to']['global'][0] != "global"))

		}

if(is_array($style['applied_to']) && (!isset($style['applied_to']['global']) || $style['applied_to']['global'][0] != "global"))

		{
$attached_to = '';

		{
$attached_to = '';


$applied_to_count = count($style['applied_to']);
$count = 0;


$applied_to_count = count($style['applied_to']);
$count = 0;

Zeile 1439Zeile 1435
			foreach($style['applied_to'] as $name => $actions)
{
if(!$name)

			foreach($style['applied_to'] as $name => $actions)
{
if(!$name)

				{
continue;
}


				{
continue;
}


				if(array_key_exists($name, $properties['colors']))
{
$colors[] = $properties['colors'][$name];

				if(array_key_exists($name, $properties['colors']))
{
$colors[] = $properties['colors'][$name];

				}


				}


				if(count($colors))
{
// Colors override files and are handled below.
continue;

				if(count($colors))
{
// Colors override files and are handled below.
continue;

				}


				}


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

$name = htmlspecialchars_uni($name);

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

$name = htmlspecialchars_uni($name);





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

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





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

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

				}


				}


				if($count == $applied_to_count && $count > 1)
{
$sep = " {$lang->and} ";

				if($count == $applied_to_count && $count > 1)
{
$sep = " {$lang->and} ";

Zeile 1550Zeile 1546

$options = build_theme_array($theme['tid']);
$form_container->output_row($lang->parent_theme." <em>*</em>", $lang->parent_theme_desc, $form->generate_select_box('pid', $options, $theme['pid'], array('id' => 'pid')), 'pid');


$options = build_theme_array($theme['tid']);
$form_container->output_row($lang->parent_theme." <em>*</em>", $lang->parent_theme_desc, $form->generate_select_box('pid', $options, $theme['pid'], array('id' => 'pid')), 'pid');


$options = array();


$options = array();

	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
$options['all'] = $lang->all_user_groups;
while($usergroup = $db->fetch_array($query))
{
$options[(int)$usergroup['gid']] = $usergroup['title'];

	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
$options['all'] = $lang->all_user_groups;
while($usergroup = $db->fetch_array($query))
{
$options[(int)$usergroup['gid']] = $usergroup['title'];

	}

	}

	$form_container->output_row($lang->allowed_user_groups, $lang->allowed_user_groups_desc, $form->generate_select_box('allowedgroups[]', $options, explode(",", $theme['allowedgroups']), array('id' => 'allowedgroups', 'multiple' => true, 'size' => 5)), 'allowedgroups');

$options = array();

	$form_container->output_row($lang->allowed_user_groups, $lang->allowed_user_groups_desc, $form->generate_select_box('allowedgroups[]', $options, explode(",", $theme['allowedgroups']), array('id' => 'allowedgroups', 'multiple' => true, 'size' => 5)), 'allowedgroups');

$options = array();

Zeile 1569Zeile 1565
	$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 1590Zeile 1586
	$form_container->output_row($lang->inner_border, $lang->inner_border_desc, $form->generate_numeric_field('borderwidth', $properties['borderwidth'], array('id' => 'borderwidth', 'min' => 0)), 'borderwidth');

$form_container->end();

	$form_container->output_row($lang->inner_border, $lang->inner_border_desc, $form->generate_numeric_field('borderwidth', $properties['borderwidth'], array('id' => 'borderwidth', 'min' => 0)), 'borderwidth');

$form_container->end();





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

if(!$properties['colors'] || !is_array($properties['colors']))
{
$color_setting = $lang->colors_no_color_setting;

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

if(!$properties['colors'] || !is_array($properties['colors']))
{
$color_setting = $lang->colors_no_color_setting;

	}
else

	}
else

	{
$colors = array('none' => $lang->colors_please_select);
$colors = array_merge($colors, $properties['colors']);

	{
$colors = array('none' => $lang->colors_please_select);
$colors = array_merge($colors, $properties['colors']);

Zeile 1638Zeile 1634
	if(!$theme['tid'] || $theme['tid'] == 1)
{
flash_message($lang->error_invalid_theme, 'error');

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

	}

$plugins->run_hooks("admin_style_themes_stylesheet_properties");

	}

$plugins->run_hooks("admin_style_themes_stylesheet_properties");

Zeile 1722Zeile 1718
						{
$attached_to .= "?".$actions_list;
}

						{
$attached_to .= "?".$actions_list;
}





						$attached[] = $attached_to;
}
}

						$attached[] = $attached_to;
}
}

Zeile 1732Zeile 1728
				if(!is_array($mybb->input['color']))
{
$errors[] = $lang->error_no_color_picked;

				if(!is_array($mybb->input['color']))
{
$errors[] = $lang->error_no_color_picked;

				}

				}

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

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

				}
}

				}
}


// Update Stylesheet
$update_array = array(


// Update Stylesheet
$update_array = array(

Zeile 1764Zeile 1760
				if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $stylesheet['stylesheet']))
{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);

				if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $stylesheet['stylesheet']))
{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);

				}

				}

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

$filename_min = str_replace('.css', '.min.css', $stylesheet['cachefile']);

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

$filename_min = str_replace('.css', '.min.css', $stylesheet['cachefile']);

Zeile 1849Zeile 1845
		$stylesheet['colors'] = array();

if(!is_array($properties['colors']))

		$stylesheet['colors'] = array();

if(!is_array($properties['colors']))

		{

		{

			$properties['colors'] = array();
}


			$properties['colors'] = array();
}


Zeile 1934Zeile 1930
	{
$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_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>";
}


		$specific_colors .= $form_container->end(true)."</div>";
}


Zeile 1995Zeile 1991

echo <<<EOF



echo <<<EOF


	<script type="text/javascript" src="./jscripts/theme_properties.js?ver=1820"></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 2010Zeile 2006

// Shows the page where you can actually edit a particular selector or the whole stylesheet
if($mybb->input['action'] == "edit_stylesheet" && (!isset($mybb->input['mode']) || $mybb->input['mode'] == "simple"))


// Shows the page where you can actually edit a particular selector or the whole stylesheet
if($mybb->input['action'] == "edit_stylesheet" && (!isset($mybb->input['mode']) || $mybb->input['mode'] == "simple"))

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

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



$plugins->run_hooks("admin_style_themes_edit_stylesheet_simple");


Zeile 2046Zeile 2042

// 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']);
}

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





		// Insert the modified CSS
$new_stylesheet = $stylesheet['stylesheet'];

		// Insert the modified CSS
$new_stylesheet = $stylesheet['stylesheet'];





		if($mybb->input['serialized'] == 1)
{
$mybb->input['css_bits'] = my_unserialize($mybb->input['css_bits']);

		if($mybb->input['serialized'] == 1)
{
$mybb->input['css_bits'] = my_unserialize($mybb->input['css_bits']);

Zeile 2062Zeile 2058
		foreach($mybb->input['css_bits'] as $field => $value)
{
if(!trim($value) || !trim($field))

		foreach($mybb->input['css_bits'] as $field => $value)
{
if(!trim($value) || !trim($field))

			{

			{

				continue;
}

if($field == "extra")

				continue;
}

if($field == "extra")

			{

			{

				$css_to_insert .= $value."\n";
}
else

				$css_to_insert .= $value."\n";
}
else

Zeile 2075Zeile 2071
				$field = str_replace("_", "-", $field);
$css_to_insert .= "{$field}: {$value};\n";
}

				$field = str_replace("_", "-", $field);
$css_to_insert .= "{$field}: {$value};\n";
}

		}

$new_stylesheet = insert_into_css($css_to_insert, $mybb->input['selector'], $new_stylesheet);

		}

$new_stylesheet = insert_into_css($css_to_insert, $mybb->input['selector'], $new_stylesheet);


// Now we have the new stylesheet, save it
$updated_stylesheet = array(


// Now we have the new stylesheet, save it
$updated_stylesheet = array(

Zeile 2104Zeile 2100
		if(!$mybb->input['ajax'])
{
flash_message($lang->success_stylesheet_updated, 'success');

		if(!$mybb->input['ajax'])
{
flash_message($lang->success_stylesheet_updated, 'success');





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

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

Zeile 2231Zeile 2227
	$table = new Table;
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[background]', $properties['background'], array('id' => 'css_bits[background]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->background}</strong></div>", array('style' => 'width: 20%;'));
$table->construct_cell("<strong>{$lang->extra_css_atribs}</strong><br /><div style=\"align: center;\">".$form->generate_text_area('css_bits[extra]', $properties['extra'], array('id' => 'css_bits[extra]', 'style' => 'width: 98%;', 'rows' => '19'))."</div>", array('rowspan' => 8));

	$table = new Table;
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[background]', $properties['background'], array('id' => 'css_bits[background]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->background}</strong></div>", array('style' => 'width: 20%;'));
$table->construct_cell("<strong>{$lang->extra_css_atribs}</strong><br /><div style=\"align: center;\">".$form->generate_text_area('css_bits[extra]', $properties['extra'], array('id' => 'css_bits[extra]', 'style' => 'width: 98%;', 'rows' => '19'))."</div>", array('rowspan' => 8));

	$table->construct_row();

	$table->construct_row();

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[color]', $properties['color'], array('id' => 'css_bits[color]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->color}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[color]', $properties['color'], array('id' => 'css_bits[color]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->color}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_row();

	$table->construct_row();

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[width]', $properties['width'], array('id' => 'css_bits[width]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->width}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[width]', $properties['width'], array('id' => 'css_bits[width]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->width}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_row();

	$table->construct_row();

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_family]', $properties['font-family'], array('id' => 'css_bits[font_family]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_family}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_family]', $properties['font-family'], array('id' => 'css_bits[font_family]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_family}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_row();

	$table->construct_row();

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;'));

	$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;'));
$table->construct_row();
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;'));

Zeile 2274Zeile 2270
}

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

{
// 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;

	if(!$parent_list)
{
$parent_list = 1;

Zeile 2363Zeile 2359
<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/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=1813"></script>

<script src="./jscripts/codemirror/addon/search/search.js?ver=1821"></script>

';
}


';
}


Zeile 2639Zeile 2635
<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/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=1813"></script>

<script src="./jscripts/codemirror/addon/search/search.js?ver=1821"></script>

';
}


';
}


Zeile 2903Zeile 2899
	}

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?ver=1820"></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 2981Zeile 2977
		$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($theme['tid'], $theme['name']);


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