Add support for DESTDIR.

Former-commit-id: 0252a660a3d8250657cd5f7b8fcfd620172c8a65
This commit is contained in:
Ramon Novoa 2019-03-26 11:47:20 +01:00
parent c1536b7978
commit d740b32810

View File

@ -1438,7 +1438,13 @@ function enterprise_include($filename)
global $config;
// Load enterprise extensions
$filepath = realpath($config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename);
if (defined('DESTDIR')) {
$destdir = DESTDIR;
} else {
$destdir = '';
}
$filepath = realpath($destdir.$config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename);
if ($filepath === false) {
return ENTERPRISE_NOT_HOOK;