From c3e21463b0f68ad684fdbf9d3bd230948f537406 Mon Sep 17 00:00:00 2001 From: christophboecker Date: Fri, 20 Sep 2024 15:00:52 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Pr=C3=BCfung=20auf=20nicht=20vorhandene=20S?= =?UTF-8?q?eite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/neues.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/neues.php b/lib/neues.php index 2e2b9a3..7ae5927 100644 --- a/lib/neues.php +++ b/lib/neues.php @@ -90,17 +90,20 @@ public static function htmlEncode(string $value): string */ public static function epPagesPrepared(rex_extension_point $ep): void { + $neues = rex_be_controller::getPageObject('neues'); + if (null === $neues) { + return; + } + $_csrf_key = Entry::table()->getCSRFKey(); $params = rex_csrf_token::factory($_csrf_key)->getUrlParams(); - $params['table_name'] = Entry::table()->getTableName(); // Tabellenname anpassen $params['rex_yform_manager_popup'] = '0'; $params['func'] = 'add'; $href = rex_url::backendPage('neues/entry', $params); - $neues = rex_be_controller::getPageObject('neues'); $neues->setTitle( $neues->getTitle() . ' +', From 9d27caeaf7cd54dc52aadcc05296c56fd992f1f8 Mon Sep 17 00:00:00 2001 From: christophboecker Date: Fri, 20 Sep 2024 13:02:00 +0000 Subject: [PATCH 2/2] Apply php-cs-fixer changes --- lib/neues.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neues.php b/lib/neues.php index 7ae5927..0c04233 100644 --- a/lib/neues.php +++ b/lib/neues.php @@ -94,7 +94,7 @@ public static function epPagesPrepared(rex_extension_point $ep): void if (null === $neues) { return; } - + $_csrf_key = Entry::table()->getCSRFKey(); $params = rex_csrf_token::factory($_csrf_key)->getUrlParams();