From d740b328109432e8c1fba06f1baecc7f5d52e6a0 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 26 Mar 2019 11:47:20 +0100 Subject: [PATCH] Add support for DESTDIR. Former-commit-id: 0252a660a3d8250657cd5f7b8fcfd620172c8a65 --- pandora_console/include/functions.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index e1861e70a3..9816e373bb 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -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;