namespace Friendica\Core;
use Friendica\BaseObject;
-use Friendica\Core\Logger;
-use Friendica\Core\System;
use Friendica\Model\Profile;
+require_once 'boot.php';
+
/**
* Some functions to handle themes
*/
*
* The screenshot is expected as view/theme/$theme/screenshot.[png|jpg].
*
- * @param sring $theme The name of the theme
+ * @param string $theme The name of the theme
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function getScreenshot($theme)
{
* @param string $file Filename
* @param string $root Full root path
* @return string Path to the file or empty string if the file isn't found
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function getPathForFile($file, $root = '')
{
*/
public static function getStylesheetPath($theme)
{
+ if (!file_exists('view/theme/' . $theme . '/style.php')) {
+ return 'view/theme/' . $theme . '/style.css';
+ }
+
$a = BaseObject::getApp();
$query_params = [];
$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) : '');
}
}