Merge pull request #6380 from MrPetovan/bug/5148-get-cookies-from-safari

Change stylesheet path name for mobile browsers
This commit is contained in:
Michael Vogel 2019-01-06 20:37:33 +01:00 committed by GitHub
commit b7bf335e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,7 @@
namespace Friendica\Core; namespace Friendica\Core;
use Friendica\BaseObject;
use Friendica\Core\Logger; use Friendica\Core\Logger;
use Friendica\Core\System; use Friendica\Core\System;
@ -191,11 +192,16 @@ class Theme
*/ */
public static function getStylesheetPath($theme) public static function getStylesheetPath($theme)
{ {
$a = get_app(); $a = BaseObject::getApp();
$opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : ''); $opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : '');
if (file_exists('view/theme/' . $theme . '/style.php')) { 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'; return 'view/theme/' . $theme . '/style.css';