From 0a7c0e35f3756847b52c06c07fe30449e76adcb2 Mon Sep 17 00:00:00 2001 From: Alexander Walther Date: Mon, 8 Jul 2024 11:35:16 +0200 Subject: [PATCH 1/3] Update boot.php --- boot.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/boot.php b/boot.php index 254af3e..cc7d0c9 100644 --- a/boot.php +++ b/boot.php @@ -218,3 +218,21 @@ static function ($a) { ); } }); + + +if(rex::isBackend()) { + $addon = rex_addon::get('neues'); + $pages = $addon->getProperty('pages'); + + $_csrf_key = rex_yform_manager_table::get('rex_neues_entry')->getCSRFKey(); + $token = rex_csrf_token::factory($_csrf_key)->getUrlParams(); + + $params = array(); + $params['table_name'] = 'rex_neues_entry'; // Tabellenname anpassen + $params['rex_yform_manager_popup'] = '0'; + $params['_csrf_token'] = $token['_csrf_token']; + $params['func'] = 'add'; + + $pages['neues']['title'] .= ' +'; + $addon->setProperty('pages', $pages); +} From 8d5dc7edd570fdf56c253996c8ebfbce76d5712a Mon Sep 17 00:00:00 2001 From: alxndr-w Date: Mon, 8 Jul 2024 09:42:04 +0000 Subject: [PATCH 2/3] Apply php-cs-fixer changes --- boot.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/boot.php b/boot.php index cc7d0c9..f894144 100644 --- a/boot.php +++ b/boot.php @@ -219,20 +219,19 @@ static function ($a) { } }); - -if(rex::isBackend()) { +if (rex::isBackend()) { $addon = rex_addon::get('neues'); $pages = $addon->getProperty('pages'); - + $_csrf_key = rex_yform_manager_table::get('rex_neues_entry')->getCSRFKey(); $token = rex_csrf_token::factory($_csrf_key)->getUrlParams(); - $params = array(); + $params = []; $params['table_name'] = 'rex_neues_entry'; // Tabellenname anpassen $params['rex_yform_manager_popup'] = '0'; $params['_csrf_token'] = $token['_csrf_token']; $params['func'] = 'add'; - $pages['neues']['title'] .= ' +'; - $addon->setProperty('pages', $pages); + $pages['neues']['title'] .= ' +'; + $addon->setProperty('pages', $pages); } From 44e33403dfda252d202e2efcb7ad46feb30f2da1 Mon Sep 17 00:00:00 2001 From: Alexander Walther Date: Tue, 16 Jul 2024 17:33:29 +0200 Subject: [PATCH 3/3] =?UTF-8?q?CSS=20etwas=20h=C3=BCbscher=20gemacht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boot.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index f894144..735c4a8 100644 --- a/boot.php +++ b/boot.php @@ -11,6 +11,7 @@ use rex_csrf_token; use rex_extension; use rex_extension_point; +use rex_package; use rex_plugin; use rex_url; use rex_yform_manager_dataset; @@ -219,7 +220,7 @@ static function ($a) { } }); -if (rex::isBackend()) { +if (rex::isBackend() && \rex_addon::get('neues') && \rex_addon::get('neues')->isAvailable() && !rex::isSafeMode()) { $addon = rex_addon::get('neues'); $pages = $addon->getProperty('pages'); @@ -232,6 +233,8 @@ static function ($a) { $params['_csrf_token'] = $token['_csrf_token']; $params['func'] = 'add'; - $pages['neues']['title'] .= ' +'; + $href = rex_url::backendPage('neues/entry', $params); + + $pages['neues']['title'] .= ' +'; $addon->setProperty('pages', $pages); }