Vergleich admin/inc/functions_themes.php - 1.8.16 - 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;
}

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

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

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

			}

			}


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


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

Zeile 331Zeile 333
		);

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

		);

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

	}

	}


update_theme_stylesheet_list($theme_id);



update_theme_stylesheet_list($theme_id);


Zeile 345Zeile 347
 * @param string $string The string to parse variables for
* @param array $variables Array of variables
* @return string Parsed string with variables replaced

 * @param string $string The string to parse variables for
* @param array $variables Array of variables
* @return string Parsed string with variables replaced

 */

 */

function parse_theme_variables($string, $variables=array())
{
$find = array();

function parse_theme_variables($string, $variables=array())
{
$find = array();

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