From bbc4468cb1a694fd8053055d3abfe1ae13aed5a5 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 21 Mar 2025 02:48:20 +0000 Subject: [PATCH] crash backup --- Controller/ApiController.php | 4 ++-- Controller/BackendController.php | 2 +- Theme/Backend/script-list.tpl.php | 2 +- Theme/Backend/script-template-create.tpl.php | 4 ++-- tests/EventCourse/EventCourse.tpl.php | 10 +++++----- tests/EventCourse/EventCourse.xlsx.php | 2 +- tests/depreciation/view.csv.php | 12 ++++++------ tests/depreciation/view.ppt.php | 12 ++++++------ tests/depreciation/view.tpl.php | 12 ++++++------ tests/depreciation/view.xls.php | 12 ++++++------ 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index c18e32c..a9aa955 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -88,7 +88,7 @@ final class ApiController extends Controller ->with('reports/source') ->with('reports/source/sources') ->with('createdBy') - ->where('id', (int) $request->getData('id')) + ->where('id', $request->getDataInt('id') ?? 0) ->execute(); $accountId = $request->header->account; @@ -151,7 +151,7 @@ final class ApiController extends Controller private function setScriptResponseHeader(View $view, string $name, RequestAbstract $request, ResponseAbstract $response) : void { /** @var array $tcoll */ - $tcoll = $view->getData('tcoll') ?? []; + $tcoll = $view->data['tcoll'] ?? []; switch ($request->getData('type')) { case 'pdf': diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 72da825..9612520 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -152,7 +152,7 @@ final class BackendController extends Controller ->with('tags/title') ->with('source') ->with('source/sources') - ->where('id', (int) $request->getData('id')) + ->where('id', $request->getDataInt('id') ?? 0) ->where('tags/title/language', $response->header->l11n->language) ->execute(); diff --git a/Theme/Backend/script-list.tpl.php b/Theme/Backend/script-list.tpl.php index a85f5b7..c901c8d 100644 --- a/Theme/Backend/script-list.tpl.php +++ b/Theme/Backend/script-list.tpl.php @@ -27,7 +27,7 @@ $accountDir = $account->id . ' ' . $account->login; /** @var \Modules\Media\Models\Collection[] */ $collections = $this->data['collections']; -$mediaPath = \urldecode($this->getData('path') ?? '/'); +$mediaPath = \urldecode($this->data['path'] ?? '/'); $previous = empty($templates) ? '{/base}/script/list' : '{/base}/script/list?{?}&offset=' . \reset($templates)->id . '&ptype=p'; $next = empty($templates) ? '{/base}/script/list' : 'script/list?{?}&offset=' . \end($templates)->id . '&ptype=n'; diff --git a/Theme/Backend/script-template-create.tpl.php b/Theme/Backend/script-template-create.tpl.php index f9c6a25..9a218ee 100644 --- a/Theme/Backend/script-template-create.tpl.php +++ b/Theme/Backend/script-template-create.tpl.php @@ -28,11 +28,11 @@ echo $this->data['nav']->render(); ?>
- getData('editor')->render('report-editor'); ?> + data['editor']->render('report-editor'); ?>
- getData('editor')->getData('text')->render('report-editor', 'description', 'helper-template-create'); ?> + data['editor']->data['text']->render('report-editor', 'description', 'helper-template-create'); ?>
diff --git a/tests/EventCourse/EventCourse.tpl.php b/tests/EventCourse/EventCourse.tpl.php index c90f71b..8de9ddf 100755 --- a/tests/EventCourse/EventCourse.tpl.php +++ b/tests/EventCourse/EventCourse.tpl.php @@ -15,11 +15,11 @@ declare(strict_types=1); /** * @var \phpOMS\Views\View $this */ -$tcoll = $this->getData('tcoll'); -$rcoll = $this->getData('rcoll'); -$cLang = $this->getData('lang'); -$template = $this->getData('template'); -$report = $this->getData('report'); +$tcoll = $this->data['tcoll']; +$rcoll = $this->data['rcoll']; +$cLang = $this->data['lang']; +$template = $this->data['template']; +$report = $this->data['report']; /** @noinspection PhpIncludeInspection */ $reportLanguage = include __DIR__ . '/../../../../' . \ltrim($tcoll['lang']->getPath(), '/'); diff --git a/tests/EventCourse/EventCourse.xlsx.php b/tests/EventCourse/EventCourse.xlsx.php index ef7bc35..5196772 100755 --- a/tests/EventCourse/EventCourse.xlsx.php +++ b/tests/EventCourse/EventCourse.xlsx.php @@ -2,7 +2,7 @@ declare(strict_types=1); require __DIR__ . '/Worker.php'; -$lang = $this->getData('lang'); +$lang = $this->data['lang']; \date_default_timezone_set('Europe/London'); diff --git a/tests/depreciation/view.csv.php b/tests/depreciation/view.csv.php index 5c9122d..59934cf 100755 --- a/tests/depreciation/view.csv.php +++ b/tests/depreciation/view.csv.php @@ -6,12 +6,12 @@ use phpOMS\Business\Finance\Depreciation; /** * @var \phpOMS\Views\View $this */ -$tcoll = $this->getData('tcoll'); -$rcoll = $this->getData('rcoll'); -$cLang = $this->getData('lang'); -$template = $this->getData('template'); -$report = $this->getData('report'); -$basepath = \rtrim($this->getData('basepath') ?? '', '/'); +$tcoll = $this->data['tcoll']; +$rcoll = $this->data['rcoll']; +$cLang = $this->data['lang']; +$template = $this->data['template']; +$report = $this->data['report']; +$basepath = \rtrim($this->data['basepath'] ?? '', '/'); /** @noinspection PhpIncludeInspection */ $reportLanguage = include $basepath . '/' . \ltrim($tcoll['lang']->getPath(), '/'); diff --git a/tests/depreciation/view.ppt.php b/tests/depreciation/view.ppt.php index d9b2c9e..051135c 100755 --- a/tests/depreciation/view.ppt.php +++ b/tests/depreciation/view.ppt.php @@ -14,12 +14,12 @@ use PhpOffice\PhpSpreadsheet\Style\Fill; /** * @var \phpOMS\Views\View $this */ -$tcoll = $this->getData('tcoll'); -$rcoll = $this->getData('rcoll'); -$cLang = $this->getData('lang'); -$template = $this->getData('template'); -$report = $this->getData('report'); -$basepath = \rtrim($this->getData('basepath') ?? '', '/'); +$tcoll = $this->data['tcoll']; +$rcoll = $this->data['rcoll']; +$cLang = $this->data['lang']; +$template = $this->data['template']; +$report = $this->data['report']; +$basepath = \rtrim($this->data['basepath'] ?? '', '/'); /** @noinspection PhpIncludeInspection */ $reportLanguage = include $basepath . '/' . \ltrim($tcoll['lang']->getPath(), '/'); diff --git a/tests/depreciation/view.tpl.php b/tests/depreciation/view.tpl.php index c29fc8e..caed198 100755 --- a/tests/depreciation/view.tpl.php +++ b/tests/depreciation/view.tpl.php @@ -18,12 +18,12 @@ use phpOMS\Uri\UriFactory; /** * @var \phpOMS\Views\View $this */ -$tcoll = $this->getData('tcoll'); -$rcoll = $this->getData('rcoll'); -$cLang = $this->getData('lang'); -$template = $this->getData('template'); -$report = $this->getData('report'); -$basepath = \rtrim($this->getData('basepath') ?? '', '/'); +$tcoll = $this->data['tcoll']; +$rcoll = $this->data['rcoll']; +$cLang = $this->data['lang']; +$template = $this->data['template']; +$report = $this->data['report']; +$basepath = \rtrim($this->data['basepath'] ?? '', '/'); /** @noinspection PhpIncludeInspection */ $reportLanguage = include $basepath . '/' . \ltrim($tcoll['lang']->getPath(), '/'); diff --git a/tests/depreciation/view.xls.php b/tests/depreciation/view.xls.php index 98ddc06..c73afc6 100755 --- a/tests/depreciation/view.xls.php +++ b/tests/depreciation/view.xls.php @@ -8,12 +8,12 @@ use phpOMS\Business\Finance\Depreciation; /** * @var \phpOMS\Views\View $this */ -$tcoll = $this->getData('tcoll'); -$rcoll = $this->getData('rcoll'); -$cLang = $this->getData('lang'); -$template = $this->getData('template'); -$report = $this->getData('report'); -$basepath = \rtrim($this->getData('basepath') ?? '', '/'); +$tcoll = $this->data['tcoll']; +$rcoll = $this->data['rcoll']; +$cLang = $this->data['lang']; +$template = $this->data['template']; +$report = $this->data['report']; +$basepath = \rtrim($this->data['basepath'] ?? '', '/'); /** @noinspection PhpIncludeInspection */ $reportLanguage = include $basepath . '/' . \ltrim($tcoll['lang']->getPath(), '/');