Bug #22553 » isInstalled.patch
t3lib/class.t3lib_extmgm.php (working copy) | ||
---|---|---|
***************************************/
|
||
/**
|
||
* 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
|
||
*
|