Bug #18050
closednew method to find a specific AjaxCall
0%
Description
with the new Ajax-Interface there is a new standard for ajaxcalls in BE.
The ajaxID has this syntax:
classname::methodename
In BE many classes use this interface. In any case they have to differ if they are called from Ajax or not, eg to do some additional initialising of needed Objects.
At the moment they do it this way:
if(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) { ... }
But this is wrong, these flags are set if any AjaxCall was started before. So may be this can fail.
For this case i introduce a new static function in t3lib_div::findAjaxCall($classname) which returns true, if the classname is part of the ajaxId, and the determination could be done by this call:
if (t3lib_div::findAjaxCall('SC_alt_db_navframe') { ...}
(issue imported from #M7266)
Files