[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 <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
This commit is contained in:
Wouter Wolters 2015-03-02 22:42:23 +01:00 committed by Benjamin Mack
parent 8c89786c67
commit b6b1157f6c

View file

@ -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 <base> path set.