Vergleich admin/inc/functions_themes.php - 1.8.16 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 149Zeile 149
	{
if($options['templateset'])
{

	{
if($options['templateset'])
{

			$sid = $options['templateset'];

			$sid = (int)$options['templateset'];

		}
else
{

		}
else
{

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

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

			}


			}


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

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

			}


			}


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

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

			{

			{

				$stylesheet['attributes']['disporder'] = $loop;
}

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

				$stylesheet['attributes']['disporder'] = $loop;
}

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

			}

$properties['disporder'][$stylesheet['attributes']['name']] = $stylesheet['attributes']['disporder'];

			}

$properties['disporder'][$stylesheet['attributes']['name']] = $stylesheet['attributes']['disporder'];


$new_stylesheet = array(
"name" => $db->escape_string($stylesheet['attributes']['name']),


$new_stylesheet = array(
"name" => $db->escape_string($stylesheet['attributes']['name']),

Zeile 298Zeile 300
			if($cached)
{
$css_url = $cached;

			if($cached)
{
$css_url = $cached;

			}


			}


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

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

Zeile 374Zeile 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 407Zeile 414

$fp = @fopen(MYBB_ROOT . "{$theme_directory}/{$filename}", "wb");
if(!$fp)


$fp = @fopen(MYBB_ROOT . "{$theme_directory}/{$filename}", "wb");
if(!$fp)

	{
return false;
}


	{
return false;
}


	@fwrite($fp, $stylesheet);
@fclose($fp);


	@fwrite($fp, $stylesheet);
@fclose($fp);


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

Zeile 705Zeile 714
function get_selectors_as_options($css, $selected_item=null)
{
$select = "";

function get_selectors_as_options($css, $selected_item=null)
{
$select = "";


if(!is_array($css))
{
$css = css_to_array($css);


if(!is_array($css))
{
$css = css_to_array($css);

	}

$selected = false;

	}

$selected = false;

Zeile 1003Zeile 1012
				{
$css_url = "cache/themes/theme{$theme_id}/{$stylesheet['name']}";
break;

				{
$css_url = "cache/themes/theme{$theme_id}/{$stylesheet['name']}";
break;

				}
}
}

				}
}
}

		
if(is_object($plugins))
{

		
if(is_object($plugins))
{

Zeile 1042Zeile 1051
				{
$theme_stylesheets['inherited']["{$attached_file}_{$action}"][$css_url] = $stylesheet['inherited'];
}

				{
$theme_stylesheets['inherited']["{$attached_file}_{$action}"][$css_url] = $stylesheet['inherited'];
}

			}
}

			}
}

	}

// Now we have our list of built stylesheets, save them

	}

// Now we have our list of built stylesheets, save them

Zeile 1117Zeile 1126

return true;
}


return true;
}





/**
* @param int $tid
*

/**
* @param int $tid
*

Zeile 1153Zeile 1162
	$themes = array();

foreach($themes_by_parent[$tid] as $key => $theme)

	$themes = array();

foreach($themes_by_parent[$tid] as $key => $theme)

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

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

		$parents = make_parent_theme_list($theme['pid']);

if(is_array($parents))

		$parents = make_parent_theme_list($theme['pid']);

if(is_array($parents))

Zeile 1452Zeile 1461
 */
function upgrade_css_120_to_140($css)
{

 */
function upgrade_css_120_to_140($css)
{

 
	global $mybb;

	// Update our CSS to the new stuff in 1.4
$parsed_css = css_to_array($css);


	// Update our CSS to the new stuff in 1.4
$parsed_css = css_to_array($css);