From: Hypolite Petovan Date: Sat, 5 Jan 2019 01:18:31 +0000 (-0500) Subject: Change stylesheet path name for mobile browsers X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cb635fb3cbb499ed6bf2b995a5ec1d6e9a38773a;p=friendica.git Change stylesheet path name for mobile browsers --- diff --git a/src/Core/Theme.php b/src/Core/Theme.php index 1524c29bac..73fba22407 100644 --- a/src/Core/Theme.php +++ b/src/Core/Theme.php @@ -6,6 +6,7 @@ namespace Friendica\Core; +use Friendica\BaseObject; use Friendica\Core\Logger; use Friendica\Core\System; @@ -191,11 +192,16 @@ class Theme */ public static function getStylesheetPath($theme) { - $a = get_app(); + $a = BaseObject::getApp(); $opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : ''); if (file_exists('view/theme/' . $theme . '/style.php')) { - return 'view/theme/' . $theme . '/style.pcss' . $opts; + if ($a->is_mobile) { + // Workaround for iOS Safari not sending the cookie for static files + return 'view/theme/' . $theme . '/style' . $opts; + } else { + return 'view/theme/' . $theme . '/style.pcss' . $opts; + } } return 'view/theme/' . $theme . '/style.css';