https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f6092eb
)
Add time parameter for iOS Safari to stylesheet URL
author
Hypolite Petovan
<hypolite@mrpetovan.com>
Sat, 12 Jan 2019 01:49:16 +0000
(20:49 -0500)
committer
Hypolite Petovan
<hypolite@mrpetovan.com>
Sat, 12 Jan 2019 01:49:16 +0000
(20:49 -0500)
src/Core/Theme.php
patch
|
blob
|
history
diff --git
a/src/Core/Theme.php
b/src/Core/Theme.php
index
91511b4
..
6696917
100644
(file)
--- a/
src/Core/Theme.php
+++ b/
src/Core/Theme.php
@@
-6,6
+6,7
@@
namespace Friendica\Core;
namespace Friendica\Core;
+use Friendica\BaseObject;
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Core\Logger;
use Friendica\Core\System;
@@
-191,11
+192,22
@@
class Theme
*/
public static function getStylesheetPath($theme)
{
*/
public static function getStylesheetPath($theme)
{
- $a = get_app();
+ $a = BaseObject::getApp();
+
+ $query_params = [];
+
+ // Workaround for iOS Safari not initially sending the cookie for static files
+ if ($a->mobileDetect->isIos() && $a->mobileDetect->isSafari()) {
+ $query_params['t'] = time();
+ }
+
+ if ($a->profile_uid) {
+ $query_params['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
;
+ 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.css';