[TYPO3-core] RFC:Feature #7266: new method to find a specific AjaxCall

Steffen Kamper steffen at sk-typo3.de
Sat Feb 16 12:31:40 CET 2008


REMINDER #1

The existing method is still not specific for catching the right events.

vg  Steffen

"Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag 
news:mailman.1.1201195110.29481.typo3-team-core at lists.netfielders.de...
> Hi,
>
> This is an SVN patch request.
>
> Type: Feature
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=7266
>
> Branches:
> Trunk
>
> Problem:
> 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.
>
> Solution:
> 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') { ...}
>
> Additional:
> you can try this in backend.php, simply add this:
> if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) debug("jetzt");
>
> You will see the debug output every time.
>
> These classes uses this kind of determination:
> alt_db_navframe.php
> alt_file_navframe.php
> class.filelistfoldertree.php
> class.webpagetree.php
> class.shortcutmenu.php
>
> vg  Steffen
>
> 




More information about the TYPO3-team-core mailing list