diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2017-10-06 14:32:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-06 14:32:07 +0200 |
commit | c8d96b4729a96ff2321862ca13a727658860e7a5 (patch) | |
tree | b9d19abb6351f972027dc8301d9869ba04ae45ea /application/Updater.php | |
parent | b3e39bf57ecf0f92357b1f15051cf2e9d3f1b267 (diff) | |
parent | b3e1f92e9cd0cae35bc726ca3a2356b4e631ccfa (diff) | |
download | Shaarli-c8d96b4729a96ff2321862ca13a727658860e7a5.tar.gz Shaarli-c8d96b4729a96ff2321862ca13a727658860e7a5.tar.zst Shaarli-c8d96b4729a96ff2321862ca13a727658860e7a5.zip |
Merge pull request #979 from ArthurHoaro/feature/assets-cache-version
Add a version hash for asset loading to prevent browser's cache issue
Diffstat (limited to 'application/Updater.php')
-rw-r--r-- | application/Updater.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application/Updater.php b/application/Updater.php index 40a15906..72b2def0 100644 --- a/application/Updater.php +++ b/application/Updater.php | |||
@@ -398,7 +398,7 @@ class Updater | |||
398 | */ | 398 | */ |
399 | public function updateMethodCheckUpdateRemoteBranch() | 399 | public function updateMethodCheckUpdateRemoteBranch() |
400 | { | 400 | { |
401 | if (shaarli_version === 'dev' || $this->conf->get('updates.check_updates_branch') === 'latest') { | 401 | if (SHAARLI_VERSION === 'dev' || $this->conf->get('updates.check_updates_branch') === 'latest') { |
402 | return true; | 402 | return true; |
403 | } | 403 | } |
404 | 404 | ||
@@ -413,7 +413,7 @@ class Updater | |||
413 | $latestMajor = $matches[1]; | 413 | $latestMajor = $matches[1]; |
414 | 414 | ||
415 | // Get current major version digit | 415 | // Get current major version digit |
416 | preg_match('/(\d+)\.\d+$/', shaarli_version, $matches); | 416 | preg_match('/(\d+)\.\d+$/', SHAARLI_VERSION, $matches); |
417 | $currentMajor = $matches[1]; | 417 | $currentMajor = $matches[1]; |
418 | 418 | ||
419 | if ($currentMajor === $latestMajor) { | 419 | if ($currentMajor === $latestMajor) { |