mirror of
https://github.com/friendica/friendica
synced 2024-11-10 07:02:54 +00:00
Refactor Theme::getStylesheetPath to return faster if theme style.php doesn't exist
This commit is contained in:
parent
abf20368b0
commit
a9b8eb4d56
1 changed files with 5 additions and 5 deletions
|
@ -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