diff --git a/source/plg_system_t3/includes/admin/theme.php b/source/plg_system_t3/includes/admin/theme.php index 9f2908f4bd..20536e3dd6 100644 --- a/source/plg_system_t3/includes/admin/theme.php +++ b/source/plg_system_t3/includes/admin/theme.php @@ -270,8 +270,8 @@ public static function thememagic($path) $listthemes = JFolder::folders($themepath); if (count($listthemes)) { foreach ($listthemes as $theme) { - $varsfile = $themepath . '/' . $theme . '/variables-custom.less'; - if(file_exists($varsfile)){ + //$varsfile = $themepath . '/' . $theme . '/variables-custom.less'; + //if(file_exists($varsfile)){ $tobj = new stdClass(); $tobj->id = $theme; @@ -295,7 +295,10 @@ public static function thememagic($path) } $cparams = new JRegistry; - $cparams->loadString(JFile::read($varsfile), 'LESS'); + $varsfile = $themepath . '/' . $theme . '/variables.less'; + if(file_exists($varsfile)) $cparams->loadString(JFile::read($varsfile), 'LESS'); + $varsfile = $themepath . '/' . $theme . '/variables-custom.less'; + if(file_exists($varsfile)) $cparams->loadString(JFile::read($varsfile), 'LESS'); if($params){ foreach ($cparams->toArray() as $key => $value) { $params->set($key, $value); @@ -306,7 +309,7 @@ public static function thememagic($path) $themes[$theme] = $tobj; $jsondata[$theme] = $params->toArray(); - } + //} } } }