Skip to content

Commit

Permalink
Merge pull request #125 from FriendsOfREDAXO/christophboecker-patch-1
Browse files Browse the repository at this point in the history
Prüfung auf nicht vorhandene Seite
  • Loading branch information
alxndr-w authored Sep 20, 2024
2 parents 96ac602 + 9d27cae commit 96ebb6d
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 96ebb6d

Please sign in to comment.