X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Ffront%2Fcontroller%2Fadmin%2FServerController.php;h=fabeaf2f26b09643709bbf1a23f156361fa6bb75;hb=302662797cb5e8ac6579a99297ceae301f7927a6;hp=809979402ebd2be76d46c46e23658e75cb8236d8;hpb=53054b2bf6a919fd4ff9b44b6ad1986f21f488b6;p=github%2Fshaarli%2FShaarli.git
diff --git a/application/front/controller/admin/ServerController.php b/application/front/controller/admin/ServerController.php
index 80997940..fabeaf2f 100644
--- a/application/front/controller/admin/ServerController.php
+++ b/application/front/controller/admin/ServerController.php
@@ -25,9 +25,16 @@ class ServerController extends ShaarliAdminController
*/
public function index(Request $request, Response $response): Response
{
- $latestVersion = 'v' . ApplicationUtils::getVersion(
- ApplicationUtils::$GIT_RAW_URL . '/latest/' . ApplicationUtils::$VERSION_FILE
- );
+ $releaseUrl = ApplicationUtils::$GITHUB_URL . '/releases/';
+ if ($this->container->conf->get('updates.check_updates', true)) {
+ $latestVersion = 'v' . ApplicationUtils::getVersion(
+ ApplicationUtils::$GIT_RAW_URL . '/latest/' . ApplicationUtils::$VERSION_FILE
+ );
+ $releaseUrl .= 'tag/' . $latestVersion;
+ } else {
+ $latestVersion = t('Check disabled');
+ }
+
$currentVersion = ApplicationUtils::getVersion('./shaarli_version.php');
$currentVersion = $currentVersion === 'dev' ? $currentVersion : 'v' . $currentVersion;
$phpEol = new \DateTimeImmutable(ApplicationUtils::getPhpEol(PHP_VERSION));
@@ -37,7 +44,7 @@ class ServerController extends ShaarliAdminController
$this->assignView('php_has_reached_eol', $phpEol < new \DateTimeImmutable());
$this->assignView('php_extensions', ApplicationUtils::getPhpExtensionsRequirement());
$this->assignView('permissions', ApplicationUtils::checkResourcePermissions($this->container->conf));
- $this->assignView('release_url', ApplicationUtils::$GITHUB_URL . '/releases/tag/' . $latestVersion);
+ $this->assignView('release_url', $releaseUrl);
$this->assignView('latest_version', $latestVersion);
$this->assignView('current_version', $currentVersion);
$this->assignView('thumbnails_mode', $this->container->conf->get('thumbnails.mode'));
@@ -65,7 +72,9 @@ class ServerController extends ShaarliAdminController
$this->saveWarningMessage(
t('Thumbnails cache has been cleared.') . ' ' .
- '' . t('Please synchronize them.') . ''
+ '' .
+ t('Please synchronize them.') .
+ ''
);
} else {
$folders = [