Projekt

Allgemein

Profil

GX-Task #42229 » CompatibleTemplateFix.patch

/admin/includes/functions/general.php - Till Tepelmann, 27.06.2015 22:44

Unterschiede anzeigen:

src/admin/includes/functions/general.php (revision )
1985 1985
function xtc_cfg_pull_down_template_sets()
1986 1986
{
1987 1987
	$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');
1988
	$dir = opendir(DIR_FS_CATALOG . 'templates/');
1988
	$t_template_base_dir = DIR_FS_CATALOG . 'templates/';
1989
	$dir = opendir($t_template_base_dir);
1989 1990
	if($dir)
1990 1991
	{
1991 1992
		while(($templates = readdir($dir)) !== false)
1992 1993
		{
1993
			if($templates != "CVS" and $templates != "." and $templates != "..")
1994
			if($templates != "CVS" and $templates != "." and $templates != ".." and $templates != "MobileCandy")
1994 1995
			{
1995
				if(is_dir(DIR_FS_CATALOG . 'templates/' . "//" . $templates))
1996
				$t_template_dir = $t_template_base_dir . "//" . $templates;
1997
				if(is_dir($t_template_dir) && file_exists($t_template_dir."/template_settings.php"))
1996 1998
				{
1999
					include($t_template_dir."/template_settings.php");
2000
					if(is_array($t_template_settings_array) && array_key_exists('TEMPLATE_PRESENTATION_VERSION',$t_template_settings_array))
2001
					{
2002
						if($t_template_settings_array['TEMPLATE_PRESENTATION_VERSION'] >= 2.0)
2003
						{
1997
					$templates_array[] = array('id' => $templates, 'text' => $templates);
2004
							$templates_array[] = array('id' => $templates, 'text' => $templates);
2005
						}
2006
					}
1998 2007
				}
1999 2008
			}
2000 2009
		}
    (1-1/1)