Skip to content

Firefly III: a personal finances manager

Remove the option to check for updates from Sandstorm installations.

James Cole8a15cb3a34f2
diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php
index 2cecd97947..2b7b9a1f0f 100644
--- a/app/Handlers/Events/VersionCheckEventHandler.php
+++ b/app/Handlers/Events/VersionCheckEventHandler.php
@@ -41,7 +41,7 @@ class VersionCheckEventHandler
/**
* @param RequestedVersionCheckStatus $event
*/
- public function checkForUpdates(RequestedVersionCheckStatus $event)
+ public function checkForUpdates(RequestedVersionCheckStatus $event): void
{
// in Sandstorm, cannot check for updates:
$sandstorm = 1 === (int)getenv('SANDSTORM');
diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php
index 92d0760119..41fb8cdae3 100644
--- a/app/Http/Controllers/Admin/HomeController.php
+++ b/app/Http/Controllers/Admin/HomeController.php
@@ -51,8 +51,9 @@ class HomeController extends Controller
{
$title = (string)trans('firefly.administration');
$mainTitleIcon = 'fa-hand-spock-o';
+ $sandstorm = 1 === (int)getenv('SANDSTORM');
- return view('admin.index', compact('title', 'mainTitleIcon'));
+ return view('admin.index', compact('title', 'mainTitleIcon','sandstorm'));
}
/**
diff --git a/resources/views/admin/index.twig b/resources/views/admin/index.twig
index 861cbce7b3..0f1274cb2d 100644
--- a/resources/views/admin/index.twig
+++ b/resources/views/admin/index.twig
@@ -14,7 +14,9 @@
<ul>
<li><a href="{{ route('admin.configuration.index') }}">{{ 'firefly_instance_configuration'|_ }}</a></li>
<li><a href="{{ route('admin.links.index') }}">{{ 'journal_link_configuration'|_ }}</a></li>
+ {% if not sandstorm %}
<li><a href="{{ route('admin.update-check') }}">{{ 'update_check_title'|_ }}</a></li>
+ {% endif %}
</ul>
</div>
</div>