]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Theme.php
Merge branch '2019.01-rc' into bug/6334-escape-get-app
[friendica.git] / src / Core / Theme.php
index bfff67058dbbbab0859c9101149ffb0e31286093..1ea39d606c763556a8ab94934e5b98e61e217801 100644 (file)
@@ -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';