From c786607bef7179d4b659d1bbec8eee6be226f3ec Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 13 Jun 2023 18:55:51 +0000 Subject: [PATCH] Quick backup before crash --- Controller/BackendController.php | 3 ++- Controller/TimerecordingController.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 6b34e8d..11aad21 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -179,8 +179,9 @@ final class BackendController extends Controller $id = $request->getDataString('id') ?? ''; + /** @var \Model\Setting[] $settings */ $settings = SettingMapper::getAll()->where('module', $id)->execute(); - if ($settings->id > 0) { + if (!empty($settings)) { $view->data['settings'] = !\is_array($settings) ? [$settings] : $settings; } diff --git a/Controller/TimerecordingController.php b/Controller/TimerecordingController.php index 3c2024f..ada4b32 100755 --- a/Controller/TimerecordingController.php +++ b/Controller/TimerecordingController.php @@ -47,7 +47,7 @@ final class TimerecordingController extends Controller $this->app->accountManager->get($request->header->account), $this->app->dbPool, $this->app->unitId, - $this->app->appName + $this->app->appId ); $navView = new NavigationView($this->app->l11nManager, $request, $response); @@ -76,7 +76,7 @@ final class TimerecordingController extends Controller $this->app->accountManager->get($request->header->account), $this->app->dbPool, $this->app->unitId, - $this->app->appName + $this->app->appId ); $nav = new \Modules\Navigation\Views\NavigationView($this->app->l11nManager, $request, $response); @@ -138,7 +138,7 @@ final class TimerecordingController extends Controller $this->app->accountManager->get($request->header->account), $this->app->dbPool, $this->app->unitId, - $this->app->appName + $this->app->appId ); $navView = new NavigationView($this->app->l11nManager, $request, $response);