Skip to content
Snippets Groups Projects
Commit 68ef77ef authored by Wouter Wolters's avatar Wouter Wolters Committed by Benjamin Mack
Browse files

[TASK] Remove direct call to ajax.php in ExtDirect API

A leftover from the integration of AJAX requests in index.php

Resolves: #68631
Releases: master
Change-Id: I19d4862475abded09740955225fa1a36042e1d08
Reviewed-on: http://review.typo3.org/42101


Reviewed-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
Tested-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: default avatarBenjamin Mack <benni@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarBenjamin Mack <benni@typo3.org>
parent e3de9753
Branches
Tags
No related merge requests found
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Core\ExtDirect;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......@@ -130,13 +131,11 @@ class ExtDirectApi {
* @return string
*/
public function getRoutingUrl($namespace) {
$url = '';
if (TYPO3_MODE === 'FE') {
$url = GeneralUtility::locationHeaderUrl('?eID=ExtDirect&action=route&namespace=');
$url = GeneralUtility::locationHeaderUrl('?eID=ExtDirect&action=route&namespace=' . rawurlencode($namespace));
} else {
$url = GeneralUtility::locationHeaderUrl(GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'ajax.php?ajaxID=ExtDirect::route&namespace=');
$url = BackendUtility::getAjaxUrl('ExtDirect::route', array('namespace' => $namespace));
}
$url .= rawurlencode($namespace);
return $url;
}
......@@ -144,7 +143,6 @@ class ExtDirectApi {
* Generates the API or reads it from cache
*
* @param array $filterNamespaces
* @param bool $checkGetParam
* @return string $javascriptNamespaces
*/
protected function getExtDirectApi(array $filterNamespaces) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment