From b6b1157f6c6331197703c74de4c665ba1c070e69 Mon Sep 17 00:00:00 2001 From: Wouter Wolters Date: Mon, 2 Mar 2015 22:42:23 +0100 Subject: [PATCH] [TASK] Make db_new.php dispatched Use dispatching for db_new.php Resolves: #65288 Releases: master Change-Id: Ie3ef5c8e4df8dc0181ed5e85dd780c769c2801ca Reviewed-on: http://review.typo3.org/37479 Reviewed-by: Markus Klein Tested-by: Markus Klein Reviewed-by: Benjamin Mack Tested-by: Benjamin Mack --- Classes/FrontendEditPanel.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index 40cf7df..0930e54 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -14,6 +14,7 @@ namespace TYPO3\CMS\Feedit; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Backend\FrontendBackendUserAuthentication; use TYPO3\CMS\Core\Database\DatabaseConnection; @@ -243,7 +244,7 @@ class FrontendEditPanel { } elseif ($cmd == 'new') { $rParts = explode(':', $currentRecord); if ($rParts[0] == 'pages') { - $out = $this->editPanelLinkWrap_doWrap($string, $adminURL . 'db_new.php?id=' . $rParts[1] . '&pagesOnly=1', $currentRecord); + $out = $this->editPanelLinkWrap_doWrap($string, $adminURL . BackendUtility::getModuleUrl('db_new', ['id' => $rParts[1], 'pagesOnly' => 1]), $currentRecord); } else { if (!(int)$nPid) { $nPid = MathUtility::canBeInterpretedAsInteger($rParts[1]) ? -$rParts[1] : $this->frontendController->id; @@ -264,7 +265,7 @@ class FrontendEditPanel { } /** - * Creates a link to a script (eg. typo3/alt_doc.php or typo3/db_new.php) which either opens in the current frame OR in a pop-up window. + * Creates a link to a script (eg. typo3/alt_doc.php or NewRecordController) which either opens in the current frame OR in a pop-up window. * * @param string $string The string to wrap in a link, typ. and image used as button in the edit panel. * @param string $url The URL of the link. Should be absolute if supposed to work with path set.