Vergleich admin/modules/style/themes.php - 1.4.0 - 1.4.2

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 340Zeile 340
		$properties = unserialize($theme['properties']);

$xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";

		$properties = unserialize($theme['properties']);

$xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";

		$xml .= "<theme name=\"".$theme['name']."\" version=\"".$mybb->version_code."\">\r\n";

		$xml .= "<theme name=\"".htmlspecialchars_uni($theme['name'])."\" version=\"".$mybb->version_code."\">\r\n";

		$xml .= "\t<properties>\r\n";
foreach($properties as $property => $value)
{

		$xml .= "\t<properties>\r\n";
foreach($properties as $property => $value)
{

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

		header("Content-Length: ".my_strlen($xml));

 
		header("Content-type: application/octet-stream");

		header("Content-type: application/octet-stream");

 
		header("Content-Length: ".my_strlen($xml));

		header("Pragma: no-cache");
header("Expires: 0");
echo $xml;

		header("Pragma: no-cache");
header("Expires: 0");
echo $xml;

Zeile 476Zeile 476
	}

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

		

		

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

Zeile 496Zeile 496
		'link' => "index.php?module=style/themes&amp;action=export&amp;tid={$mybb->input['tid']}",
'description' => $lang->export_theme_desc
);

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

	

	

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

if($errors)

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

if($errors)

Zeile 525Zeile 525
if($mybb->input['action'] == "add")
{
if($mybb->request_method == "post")

if($mybb->input['action'] == "add")
{
if($mybb->request_method == "post")

	{

	{

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

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

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

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

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

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

	}

	}

	

	

	$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_nav_tabs($sub_tabs, 'create_theme');

if($errors)

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

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

if($errors)

	{

	{

		$page->output_inline_error($errors);
}


		$page->output_inline_error($errors);
}


Zeile 576Zeile 576
	
$page->output_footer();
}

	
$page->output_footer();
}





if($mybb->input['action'] == "delete")
{
$query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");

if($mybb->input['action'] == "delete")
{
$query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");

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

	}

// User clicked no

	}

// User clicked no

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

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

					}
}

					}
}

			}
}


			}
}


Zeile 704Zeile 704
			foreach($mybb->input['allowedgroups'] as $gid)
{
if($gid == "all")

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

				{

				{

					$allowedgroups = "all";
break;
}

					$allowedgroups = "all";
break;
}

Zeile 1103Zeile 1103
		$stylesheets[basename($file)] = $stylesheet2;
}


		$stylesheets[basename($file)] = $stylesheet2;
}


	$this_stylesheet = $stylesheets[$stylesheet['cachefile']];	






	if(!array_key_exists($stylesheet['cachefile'], $stylesheets) && array_key_exists("css.php?stylesheet=".$stylesheet['tid'], $stylesheets))
{
$stylesheet['cachefile'] = "css.php?stylesheet=".$stylesheet['tid'];
}

$this_stylesheet = $stylesheets[$stylesheet['cachefile']];

	unset($stylesheets);

if($mybb->request_method == "post")

	unset($stylesheets);

if($mybb->request_method == "post")

Zeile 1155Zeile 1160
			// Update Stylesheet			
$update_array = array(
'name' => $db->escape_string($mybb->input['name']),

			// Update Stylesheet			
$update_array = array(
'name' => $db->escape_string($mybb->input['name']),

				'attachedto' => $db->escape_string(implode('|', $attached)),
'lastmodified' => TIME_NOW

				'attachedto' => $db->escape_string(implode('|', $attached))


			);

if($stylesheet['name'] != $mybb->input['name'])

			);

if($stylesheet['name'] != $mybb->input['name'])

Zeile 1169Zeile 1173
			// If the name changed, re-cache our stylesheet
if($stylesheet['name'] != $mybb->input['name'])
{

			// If the name changed, re-cache our stylesheet
if($stylesheet['name'] != $mybb->input['name'])
{

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

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