aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/admin
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-11-24 13:28:17 +0100
committerArthurHoaro <arthur@hoa.ro>2020-11-24 13:39:35 +0100
commit8a6b7e96b7176e03238bbb1bcaa4c8b0c25e6358 (patch)
treeb0e8910856393fe11a022faf32969915de9f598f /application/front/controller/admin
parente4b8330e459b598328bf250208386c06ec257b08 (diff)
downloadShaarli-8a6b7e96b7176e03238bbb1bcaa4c8b0c25e6358.tar.gz
Shaarli-8a6b7e96b7176e03238bbb1bcaa4c8b0c25e6358.tar.zst
Shaarli-8a6b7e96b7176e03238bbb1bcaa4c8b0c25e6358.zip
Fix: soft fail if the mutex is not working
And display the error in server admin page Fixes #1650
Diffstat (limited to 'application/front/controller/admin')
-rw-r--r--application/front/controller/admin/ServerController.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/application/front/controller/admin/ServerController.php b/application/front/controller/admin/ServerController.php
index fabeaf2f..4b74f4a9 100644
--- a/application/front/controller/admin/ServerController.php
+++ b/application/front/controller/admin/ServerController.php
@@ -39,11 +39,16 @@ class ServerController extends ShaarliAdminController
39 $currentVersion = $currentVersion === 'dev' ? $currentVersion : 'v' . $currentVersion; 39 $currentVersion = $currentVersion === 'dev' ? $currentVersion : 'v' . $currentVersion;
40 $phpEol = new \DateTimeImmutable(ApplicationUtils::getPhpEol(PHP_VERSION)); 40 $phpEol = new \DateTimeImmutable(ApplicationUtils::getPhpEol(PHP_VERSION));
41 41
42 $permissions = array_merge(
43 ApplicationUtils::checkResourcePermissions($this->container->conf),
44 ApplicationUtils::checkDatastoreMutex()
45 );
46
42 $this->assignView('php_version', PHP_VERSION); 47 $this->assignView('php_version', PHP_VERSION);
43 $this->assignView('php_eol', format_date($phpEol, false)); 48 $this->assignView('php_eol', format_date($phpEol, false));
44 $this->assignView('php_has_reached_eol', $phpEol < new \DateTimeImmutable()); 49 $this->assignView('php_has_reached_eol', $phpEol < new \DateTimeImmutable());
45 $this->assignView('php_extensions', ApplicationUtils::getPhpExtensionsRequirement()); 50 $this->assignView('php_extensions', ApplicationUtils::getPhpExtensionsRequirement());
46 $this->assignView('permissions', ApplicationUtils::checkResourcePermissions($this->container->conf)); 51 $this->assignView('permissions', $permissions);
47 $this->assignView('release_url', $releaseUrl); 52 $this->assignView('release_url', $releaseUrl);
48 $this->assignView('latest_version', $latestVersion); 53 $this->assignView('latest_version', $latestVersion);
49 $this->assignView('current_version', $currentVersion); 54 $this->assignView('current_version', $currentVersion);