diff --git a/boot.php b/boot.php index 4544c8c..798c4ce 100644 --- a/boot.php +++ b/boot.php @@ -296,3 +296,25 @@ function ($a) { ); } }); + +if (rex::isBackend() && \rex_addon::get('events') && \rex_addon::get('events')->isAvailable() && !rex::isSafeMode()) { + $addon = rex_addon::get('events'); + $pages = $addon->getProperty('pages'); + + if(!rex::getConsole()) { + $_csrf_key = rex_yform_manager_table::get('rex_event_date')->getCSRFKey(); + + $token = rex_csrf_token::factory($_csrf_key)->getUrlParams(); + + $params = []; + $params['table_name'] = 'rex_event_date'; // Tabellenname anpassen + $params['rex_yform_manager_popup'] = '0'; + $params['_csrf_token'] = $token['_csrf_token']; + $params['func'] = 'add'; + + $href = rex_url::backendPage('events/date', $params); + + $pages['events']['title'] .= ' +'; + $addon->setProperty('pages', $pages); + } +}