Project

General

Profile

Bug #18050 ยป 20080124_findAjaxCall.diff

Administrator Admin, 2008-01-24 18:31

View differences:

t3lib/class.t3lib_div.php (working copy)
}
return '\''.$value.'\'';
}
/**
* search for an Ajax call of a given class
* eg Ajax Call with ajaxId SC_alt_db_navframe::expandCollapse use class SC_alt_db_navframe, so the call could be used for this class:
* if (t3lib_div::findAjaxCall('SC_alt_db_navframe') { ...}
*
* @param string The string to encode.
* @return boolean return true if AjaxCall was found
*/
function findAjaxCall($classname) {
$ajaxID = t3lib_div::_GP('ajaxID');
$parts = explode('::',$ajaxID);
if( (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) && $classname === $parts[0]) {
return true;
}
return false;
}
}
?>
    (1-1/1)