Index: t3lib/class.t3lib_extmgm.php =================================================================== --- t3lib/class.t3lib_extmgm.php (revision 7453) +++ t3lib/class.t3lib_extmgm.php (working copy) @@ -122,6 +122,24 @@ ***************************************/ /** + * Returns true if the extension with extension key $key is installed. + * + * @param string Extension key to test + * @param boolean If $exitOnError is true and the extension is not loaded the function will die with an error message + * @return boolean + */ + public static function isInstalled($key, $exitOnError=0) { + $isInstalled = t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'], $key); + if ($exitOnError && !isset($isInstalled)) { + throw new BadFunctionCallException( + 'TYPO3 Fatal Error: Extension "' . $key . '" was not installed!', + 1272625953 + ); + } + return $isInstalled; + } + + /** * Returns true if the extension with extension key $key is loaded. * Usage: 109 *