]> git.mxchange.org Git - friendica.git/commitdiff
Change stylesheet path name for mobile browsers
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 5 Jan 2019 01:18:31 +0000 (20:18 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 5 Jan 2019 01:18:31 +0000 (20:18 -0500)
src/Core/Theme.php

index 1524c29bacfe2a8cd878f51ad01e2944d88839d5..73fba22407d140111a360c3587ca654afbcd9122 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';