Skip to content

Commit

Permalink
Prüfung auf nicht vorhandene Seite
Browse files Browse the repository at this point in the history
  • Loading branch information
christophboecker authored Sep 20, 2024
1 parent 96ac602 commit c3e2146
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/neues.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() .
' <a class="label label-primary tex-primary" style="position: absolute; right: 18px; top: 10px; padding: 0.2em 0.6em 0.3em; border-radius: 3px; color: white; display: inline; width: auto;" href="' . $href . '">+</a>',
Expand Down

0 comments on commit c3e2146

Please sign in to comment.