Vergleich admin/inc/functions_themes.php - 1.8.14 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 262Zeile 262
		$loop = 1;
foreach($theme['stylesheets']['stylesheet'] as $stylesheet)
{

		$loop = 1;
foreach($theme['stylesheets']['stylesheet'] as $stylesheet)
{

 
			$stylesheet['attributes']['name'] = my_substr($stylesheet['attributes']['name'], 0, 30);


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

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

			{

			{

				continue;

				continue;

			}


			}


			if(empty($stylesheet['attributes']['lastmodified']))

			if(empty($stylesheet['attributes']['lastmodified']))

			{

			{

				$stylesheet['attributes']['lastmodified'] = TIME_NOW;

				$stylesheet['attributes']['lastmodified'] = TIME_NOW;

			}

			}


if(empty($stylesheet['attributes']['disporder']))
{
$stylesheet['attributes']['disporder'] = $loop;


if(empty($stylesheet['attributes']['disporder']))
{
$stylesheet['attributes']['disporder'] = $loop;

			}

			}


if(empty($stylesheet['attributes']['attachedto']))
{


if(empty($stylesheet['attributes']['attachedto']))
{

Zeile 304Zeile 306
			if(!$attachedto)
{
$attachedto = "global";

			if(!$attachedto)
{
$attachedto = "global";

			}

			}


// private.php?compose,folders|usercp.php,global|global
$attachedto = explode("|", $attachedto);


// private.php?compose,folders|usercp.php,global|global
$attachedto = explode("|", $attachedto);

Zeile 330Zeile 332
			"stylesheets" => $db->escape_string(my_serialize($theme_stylesheets))
);


			"stylesheets" => $db->escape_string(my_serialize($theme_stylesheets))
);


		if(is_array($properties['disporder']))
{
asort($properties['disporder'], SORT_NUMERIC);

// Because inherited stylesheets can mess this up
$loop = 1;
$orders = array();
foreach($properties['disporder'] as $filename => $order)
{
$orders[$filename] = $loop;
++$loop;
}

$properties['disporder'] = $orders;
$updated_theme['properties'] = $db->escape_string(my_serialize($properties));
}

$db->update_query("themes", $updated_theme, "tid='{$theme_id}'");
}

update_theme_stylesheet_list($theme_id);

		$db->update_query("themes", $updated_theme, "tid='{$theme_id}'");
}

update_theme_stylesheet_list($theme_id);



















// And done?
return $theme_id;


// And done?
return $theme_id;

Zeile 391Zeile 376
	$filename = basename($filename);
$tid = (int) $tid;
$theme_directory = "cache/themes/theme{$tid}";

	$filename = basename($filename);
$tid = (int) $tid;
$theme_directory = "cache/themes/theme{$tid}";

 

if(substr($filename, -4) != ".css")
{
return false;
}


// If we're in safe mode save to the main theme folder by default
if($mybb->safemode)


// If we're in safe mode save to the main theme folder by default
if($mybb->safemode)

Zeile 511Zeile 501
}

/**

}

/**

 
 * @deprecated

 * @param string $url
*
* @return string

 * @param string $url
*
* @return string

Zeile 538Zeile 529
}

/**

}

/**

 
 * @deprecated

 * @param string $url
*
* @return string

 * @param string $url
*
* @return string

Zeile 575Zeile 567
	{
$query = $db->simple_select("themes", "*", "tid='".(int)$parent."'");
$parent_theme = $db->fetch_array($query);

	{
$query = $db->simple_select("themes", "*", "tid='".(int)$parent."'");
$parent_theme = $db->fetch_array($query);

		if(count($properties) == 0 || !is_array($properties))

		if(!is_array($properties) || count($properties) == 0)

		{
$parent_properties = my_unserialize($parent_theme['properties']);
if(!empty($parent_properties))

		{
$parent_properties = my_unserialize($parent_theme['properties']);
if(!empty($parent_properties))

Zeile 638Zeile 630
		);
$properties['logo'] = parse_theme_variables($properties['logo'], $theme_vars);
}

		);
$properties['logo'] = parse_theme_variables($properties['logo'], $theme_vars);
}

 
	
$updated_theme = array();

	if(!empty($stylesheets))
{
$updated_theme['stylesheets'] = $db->escape_string(my_serialize($stylesheets));

	if(!empty($stylesheets))
{
$updated_theme['stylesheets'] = $db->escape_string(my_serialize($stylesheets));