Vergleich admin/modules/style/themes.php - 1.8.12 - 1.8.22

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

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

			$table->construct_row();
}
}

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

Zeile 262Zeile 260
				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 286Zeile 282
	// Recommended themes = Default; Otherwise search results & pagination
if($mybb->request_method == "post")
{

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

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

Zeile 391Zeile 387

// Log admin action
log_admin_action($theme_id);


// Log admin action
log_admin_action($theme_id);





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

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

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;

			{
continue;

			}

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

			}

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 578Zeile 574
						}
}
}

						}
}
}

			}
}


			}
}


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

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

		$inherited_load = array_unique($inherited_load);

$inherited_themes = array();
if(count($inherited_load) > 0)

		$inherited_load = array_unique($inherited_load);

$inherited_themes = $theme_stylesheets = array();
if(count($inherited_load) > 0)

		{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
while($inherited_theme = $db->fetch_array($query))
{
$inherited_themes[$inherited_theme['tid']] = $inherited_theme['name'];
}

		{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
while($inherited_theme = $db->fetch_array($query))
{
$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 658
		$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 902
			$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 1046Zeile 1037
		$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");


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

Zeile 1094Zeile 1085

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 1154Zeile 1152
			if($numthemes)
{
$errors[] = $lang->error_theme_already_exists;

			if($numthemes)
{
$errors[] = $lang->error_theme_already_exists;

			}

			}

		}

if($update_array['pid'])

		}

if($update_array['pid'])

Zeile 1162Zeile 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 1173Zeile 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 1187Zeile 1185
		if(empty($errors))
{
$plugins->run_hooks("admin_style_themes_edit_commit");

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





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

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

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

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

			}

			}


// 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');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
}
}

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





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


Zeile 1214Zeile 1212
	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;
}


			continue;
}


Zeile 1234Zeile 1232
			}
}
}

			}
}
}





	$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();
if(count($inherited_load) > 0)


$inherited_themes = $theme_stylesheets = array();
if(count($inherited_load) > 0)

	{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
while($inherited_theme = $db->fetch_array($query))

	{
$query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
while($inherited_theme = $db->fetch_array($query))

		{

		{

			$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))
{
if(!isset($theme_stylesheets[$theme_stylesheet['name']]) && in_array($theme_stylesheet['tid'], $inherited_load))

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


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


Zeile 1272Zeile 1265
			// Error out
flash_message($lang->error_no_display_order, 'error');
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

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

		}

		}


$orders = array();
foreach($theme_stylesheets as $stylesheet => $properties)


$orders = array();
foreach($theme_stylesheets as $stylesheet => $properties)

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

if($theme['def'] == 1)

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

if($theme['def'] == 1)

		{

		{

			$cache->update_default_theme();
}


			$cache->update_default_theme();
}


Zeile 1381Zeile 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 1393Zeile 1386
		if(is_array($style['inherited']))
{
foreach($style['inherited'] as $tid)

		if(is_array($style['inherited']))
{
foreach($style['inherited'] as $tid)

			{

			{

				if($inherited_themes[$tid])
{
$inherited_ary[$tid] = $inherited_themes[$tid];

				if($inherited_themes[$tid])
{
$inherited_ary[$tid] = $inherited_themes[$tid];

				}
}

				}
}

		}

if(!empty($inherited_ary))

		}

if(!empty($inherited_ary))

Zeile 1414Zeile 1407
				{
$sep = " {$lang->and} ";
}

				{
$sep = " {$lang->and} ";
}





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


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


Zeile 1424Zeile 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 = '';

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

			$attached_to = '';

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

Zeile 1438Zeile 1431
			{
$properties['colors'] = array();
}

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





			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']))

				}

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

Zeile 1452Zeile 1445
				}

if(count($colors))

				}

if(count($colors))

				{

				{

					// Colors override files and are handled below.
continue;
}

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

					// Colors override files and are handled below.
continue;
}

// 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 1568Zeile 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 1595Zeile 1592
	if(!$properties['colors'] || !is_array($properties['colors']))
{
$color_setting = $lang->colors_no_color_setting;

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

	}

	}

	else
{
$colors = array('none' => $lang->colors_please_select);

	else
{
$colors = array('none' => $lang->colors_please_select);

Zeile 1683Zeile 1680
		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)

		}

if(!$errors)

Zeile 1773Zeile 1773
			$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 1804Zeile 1804
	}

$applied_to = $this_stylesheet['applied_to'];

	}

$applied_to = $this_stylesheet['applied_to'];

	unset($this_stylesheet);

	unset($this_stylesheet);


if($errors)
{


if($errors)
{

Zeile 1825Zeile 1825
				}
}
}

				}
}
}

	}

	}

	else
{
$mybb->input['name'] = $stylesheet['name'];
}

	else
{
$mybb->input['name'] = $stylesheet['name'];
}





	$global_checked[1] = "checked=\"checked\"";
$global_checked[2] = "";
$global_checked[3] = "";

	$global_checked[1] = "checked=\"checked\"";
$global_checked[2] = "";
$global_checked[3] = "";

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

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

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

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

		{

		{

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


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


Zeile 1929Zeile 1929
	if(is_array($properties['colors']))
{
$specific_colors = "<div id=\"attach_2\" class=\"attachs\">";

	if(is_array($properties['colors']))
{
$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;"))."
";


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

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

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

Zeile 1953Zeile 1953
			{
checked = $(this).val();
}

			{
checked = $(this).val();
}

		});

		});

		$(\'.\'+id+\'s\').each(function(e)
{
$(this).hide();

		$(\'.\'+id+\'s\').each(function(e)
{
$(this).hide();

Zeile 1971Zeile 1971
		'.$specific_colors_option.'
'.$specific_colors.'
</dl>

		'.$specific_colors_option.'
'.$specific_colors.'
</dl>

	<script type="text/javascript">

	<script type="text/javascript">

	checkAction(\'attach\');'.$check_actions.'
</script>';


	checkAction(\'attach\');'.$check_actions.'
</script>';


Zeile 1991Zeile 1991

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 2006Zeile 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 2024Zeile 2024
	if(!$parent_list)
{
$parent_list = 1;

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


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


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

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





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

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

Zeile 2056Zeile 2056

$css_to_insert = '';
foreach($mybb->input['css_bits'] as $field => $value)


$css_to_insert = '';
foreach($mybb->input['css_bits'] as $field => $value)

		{

		{

			if(!trim($value) || !trim($field))
{
continue;

			if(!trim($value) || !trim($field))
{
continue;

Zeile 2078Zeile 2078
		// 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 2256Zeile 2256
	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 2264Zeile 2264
//]]>
</script>';


//]]>
</script>';


	$form->end();


	$form->end();


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

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

	}

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");

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

	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?
if(!$stylesheet['sid'])

	$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?
if(!$stylesheet['sid'])

	{

	{

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

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

Zeile 2313Zeile 2313
		// 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($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 2322Zeile 2322
		if(!cache_stylesheet($theme['tid'], $stylesheet['name'], $mybb->input['stylesheet']))
{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1);

		if(!cache_stylesheet($theme['tid'], $stylesheet['name'], $mybb->input['stylesheet']))
{
$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']);


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

Zeile 2352Zeile 2352
	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>

';
}


';
}


Zeile 2490Zeile 2490
		$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 2586Zeile 2586
			else if($mybb->input['attach'] == 2)
{
if(!is_array($mybb->input['color']))

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

				{

				{

					$errors[] = $lang->error_no_color_picked;
}
else

					$errors[] = $lang->error_no_color_picked;
}
else

Zeile 2606Zeile 2606
			);

$sid = $db->insert_query("themestylesheets", $insert_array);

			);

$sid = $db->insert_query("themestylesheets", $insert_array);





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

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

Zeile 2618Zeile 2618
			$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']));
}

	}

	}


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


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

Zeile 2648Zeile 2648
	$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['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,


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

Zeile 2668Zeile 2668
	);

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

	);

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





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

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

Zeile 2679Zeile 2679
			{
list(, $id) = explode('_', $name);
$id = (int)$id;

			{
list(, $id) = explode('_', $name);
$id = (int)$id;





				$mybb->input['applied_to'][$value] = array(0 => 'global');

if($mybb->input['action_'.$id] == 1)

				$mybb->input['applied_to'][$value] = array(0 => 'global');

if($mybb->input['action_'.$id] == 1)

Zeile 2690Zeile 2690
		}

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

		}

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

		{

		{

			$add_checked[1] = "checked=\"checked\"";
$add_checked[2] = "";
}

			$add_checked[1] = "checked=\"checked\"";
$add_checked[2] = "";
}

Zeile 2721Zeile 2721
		$check_actions = "";

foreach($mybb->input['applied_to'] as $name => $actions)

		$check_actions = "";

foreach($mybb->input['applied_to'] as $name => $actions)

		{

		{

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

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

			}

			}


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


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

Zeile 2751Zeile 2751
				</table>
</dd>
</dl>";

				</table>
</dd>
</dl>";





			$form_container = new FormContainer();
$form_container->output_row("", "", "<span style=\"float: right;\"><a href=\"\" id=\"delete_img_{$count}\"><img src=\"styles/{$page->style}/images/icons/cross.png\" alt=\"{$lang->delete}\" title=\"{$lang->delete}\" /></a></span>{$lang->file} &nbsp;".$form->generate_text_box("attached_{$count}", $name, array('id' => "attached_{$count}", 'style' => 'width: 200px;')), "attached_{$count}");

			$form_container = new FormContainer();
$form_container->output_row("", "", "<span style=\"float: right;\"><a href=\"\" id=\"delete_img_{$count}\"><img src=\"styles/{$page->style}/images/icons/cross.png\" alt=\"{$lang->delete}\" title=\"{$lang->delete}\" /></a></span>{$lang->file} &nbsp;".$form->generate_text_box("attached_{$count}", $name, array('id' => "attached_{$count}", 'style' => 'width: 200px;')), "attached_{$count}");





			$form_container->output_row("", "", $specific_file);

			$form_container->output_row("", "", $specific_file);





			$specific_files .= "<div id=\"attached_form_{$count}\">".$form_container->end(true)."</div><div id=\"attach_box_{$count}\"></div>";

			$specific_files .= "<div id=\"attached_form_{$count}\">".$form_container->end(true)."</div><div id=\"attach_box_{$count}\"></div>";





			$check_actions .= "\n\tcheckAction('action_{$count}');";

			$check_actions .= "\n\tcheckAction('action_{$count}');";





			++$count;

			++$count;

		}


		}


		if($check_actions)
{
$global_checked[3] = "";
$global_checked[2] = "checked=\"checked\"";
$global_checked[1] = "";

		if($check_actions)
{
$global_checked[3] = "";
$global_checked[2] = "checked=\"checked\"";
$global_checked[1] = "";

		}

		}

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

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

Zeile 2779Zeile 2779
		{
// We might have colors here...
foreach($mybb->input['color'] as $color)

		{
// We might have colors here...
foreach($mybb->input['color'] as $color)

			{

			{

				// Verify this is a color for this theme
if(array_key_exists($color, $properties['colors']))
{

				// Verify this is a color for this theme
if(array_key_exists($color, $properties['colors']))
{

Zeile 2795Zeile 2795
			}
}
}

			}
}
}





	$specific_files .= "</div>";

// Colors

	$specific_files .= "</div>";

// Colors

Zeile 2805Zeile 2805
	{
$specific_colors = "<br /><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>';

	{
$specific_colors = "<br /><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>';





		$specific_color = "
<small>{$lang->colors_add_edit_desc}</small>
<br /><br />

		$specific_color = "
<small>{$lang->colors_add_edit_desc}</small>
<br /><br />

Zeile 2899Zeile 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"></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 2919Zeile 2919
	if(!verify_post_check($mybb->input['my_post_key']))
{
flash_message($lang->invalid_post_verify_key2, 'error');

	if(!verify_post_check($mybb->input['my_post_key']))
{
flash_message($lang->invalid_post_verify_key2, 'error');

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

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

$plugins->run_hooks("admin_style_themes_set_default");


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

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

$plugins->run_hooks("admin_style_themes_set_default");


	$cache->update('default_theme', $theme);

$db->update_query("themes", array('def' => 0));

	$cache->update('default_theme', $theme);

$db->update_query("themes", array('def' => 0));

Zeile 2942Zeile 2942
	$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 2955Zeile 2955

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


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

	{

	{

		flash_message($lang->error_invalid_theme, 'error');

		flash_message($lang->error_invalid_theme, 'error');

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

$plugins->run_hooks("admin_style_themes_force");


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

$plugins->run_hooks("admin_style_themes_force");


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

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

Zeile 2977Zeile 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

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