Vergleich admin/inc/functions_themes.php - 1.6.2 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 144Zeile 144
			}
}


			}
}


 
		$security_check = false;
$templatecache = array();

		foreach($templates as $template)
{

		foreach($templates as $template)
{

			// PostgreSQL causes apache to stop sending content sometimes and 
// causes the page to stop loading during many queries all at one time
if($db->engine == "pgsql")
{
echo " ";
flush();
}

$new_template = array(

			if(check_template($template['value']))
{
$security_check = true;
break;
}

$templatecache[] = array(



				"title" => $db->escape_string($template['attributes']['name']),
"template" => $db->escape_string($template['value']),
"sid" => $db->escape_string($sid),
"version" => $db->escape_string($template['attributes']['version']),
"dateline" => TIME_NOW
);

				"title" => $db->escape_string($template['attributes']['name']),
"template" => $db->escape_string($template['value']),
"sid" => $db->escape_string($sid),
"version" => $db->escape_string($template['attributes']['version']),
"dateline" => TIME_NOW
);

			$db->insert_query("templates", $new_template);

 
		}

		}

		




















if($security_check == true)
{
return -4;
}

foreach($templatecache as $template)
{
// PostgreSQL causes apache to stop sending content sometimes and
// causes the page to stop loading during many queries all at one time
if($db->engine == "pgsql")
{
echo " ";
flush();
}

$db->insert_query("templates", $template);
}


		$properties['templateset'] = $sid;

		$properties['templateset'] = $sid;

	}

	}


// Not overriding an existing theme
if(!$options['tid'])


// Not overriding an existing theme
if(!$options['tid'])

Zeile 193Zeile 210
		
foreach($theme['stylesheets']['stylesheet'] as $stylesheet)
{

		
foreach($theme['stylesheets']['stylesheet'] as $stylesheet)
{

 
			if(substr($stylesheet['attributes']['name'], -4) != ".css")
{
continue;
}


			if(!$stylesheet['attributes']['lastmodified'])
{
$stylesheet['attributes']['lastmodified'] = TIME_NOW;

			if(!$stylesheet['attributes']['lastmodified'])
{
$stylesheet['attributes']['lastmodified'] = TIME_NOW;

Zeile 373Zeile 395

function fix_css_urls($url)
{


function fix_css_urls($url)
{

	if(!preg_match("#^(https?://|/)#i", $url) && strpos($url, "../../../") === false)

	if(!preg_match("#^([a-z0-9]+\:|/)#i", $url) && strpos($url, "../../../") === false)

	{
return "url(../../../{$url})";
}

	{
return "url(../../../{$url})";
}

Zeile 514Zeile 536
	$stripped_css = preg_replace('#(?<!\\")\}#', "\n}\n", $css);

// Fetch out classes and comments

	$stripped_css = preg_replace('#(?<!\\")\}#', "\n}\n", $css);

// Fetch out classes and comments

	preg_match_all('#(\/\*(.|[\r\n])*?\*\/)?([a-z0-9a+\\\[\]\-\"=_:>\*\.\#\,\s\(\)\|~\^]+)(\s*)\{(.*?)\}\n#msi', $stripped_css, $matches, PREG_PATTERN_ORDER);

	preg_match_all('#(\/\*(.|[\r\n])*?\*\/)?([a-z0-9a+\\\[\]\-\"=_:>\*\.\#\,\s\(\)\|~|@\^]+)(\s*)\{(.*?)\}\n#msi', $stripped_css, $matches, PREG_PATTERN_ORDER);

	$total = count($matches[1]);

for($i=0; $i < $total; $i++)

	$total = count($matches[1]);

for($i=0; $i < $total; $i++)

Zeile 524Zeile 546
		$class_name = trim($class_name);
$comments = $matches[1][$i];
preg_match_all("#Name:(.*)#i", $comments, $name_match);

		$class_name = trim($class_name);
$comments = $matches[1][$i];
preg_match_all("#Name:(.*)#i", $comments, $name_match);

		if($name_match[count($name_match)-1][0])

		if(isset($name_match[count($name_match)-1][0]))

		{
$name = trim($name_match[count($name_match)-1][0]);
}
preg_match_all("#Description:(.*)#i", $comments, $description_match);

		{
$name = trim($name_match[count($name_match)-1][0]);
}
preg_match_all("#Description:(.*)#i", $comments, $description_match);

		if($description_match[count($description_match)-1][0])

		if(isset($description_match[count($description_match)-1][0]))

		{
$description = trim($description_match[count($description_match)-1][0]);
}
$class_id = md5($class_name);

		{
$description = trim($description_match[count($description_match)-1][0]);
}
$class_id = md5($class_name);

		if($already_parsed[$class_id])

		if(isset($already_parsed[$class_id]))

		{
$already_parsed[$class_id]++;
$class_id .= "_".$already_parsed[$class_id];

		{
$already_parsed[$class_id]++;
$class_id .= "_".$already_parsed[$class_id];

Zeile 869Zeile 891
		}
}


		}
}


	if(!is_array($themes_by_parent[$tid]))

	if(!isset($themes_by_parent[$tid]))

	{
return false;
}

	{
return false;
}

Zeile 1019Zeile 1041
		if($theme['tid'] > 1)
{
$popup->add_item($lang->edit_theme, "index.php?module=style-themes&amp;action=edit&amp;tid={$theme['tid']}");

		if($theme['tid'] > 1)
{
$popup->add_item($lang->edit_theme, "index.php?module=style-themes&amp;action=edit&amp;tid={$theme['tid']}");

			$theme['name'] = "<a href=\"index.php?module=style-themes&amp;action=edit&amp;tid={$theme['tid']}\">{$theme['name']}</a>";

			$theme['name'] = "<a href=\"index.php?module=style-themes&amp;action=edit&amp;tid={$theme['tid']}\">".htmlspecialchars_uni($theme['name'])."</a>";

			
// We must have at least the master and 1 other active theme
if($theme_cache['num_themes'] > 2)

			
// We must have at least the master and 1 other active theme
if($theme_cache['num_themes'] > 2)