Refactor Theme::getStylesheetPath to return faster if theme style.php doesn't exist
This commit is contained in:
parent
abf20368b0
commit
a9b8eb4d56
|
@ -193,6 +193,10 @@ class Theme
|
|||
*/
|
||||
public static function getStylesheetPath($theme)
|
||||
{
|
||||
if (!file_exists('view/theme/' . $theme . '/style.php')) {
|
||||
return 'view/theme/' . $theme . '/style.css';
|
||||
}
|
||||
|
||||
$a = BaseObject::getApp();
|
||||
|
||||
$query_params = [];
|
||||
|
@ -202,10 +206,6 @@ class Theme
|
|||
$query_params['puid'] = $puid;
|
||||
}
|
||||
|
||||
if (file_exists('view/theme/' . $theme . '/style.php')) {
|
||||
return 'view/theme/' . $theme . '/style.pcss' . (!empty($query_params) ? '?' . http_build_query($query_params) : '');
|
||||
}
|
||||
|
||||
return 'view/theme/' . $theme . '/style.css';
|
||||
return 'view/theme/' . $theme . '/style.pcss' . (!empty($query_params) ? '?' . http_build_query($query_params) : '');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue