From 419b3f4fb1e2a5aa274c49e66a604ac681e2dd22 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 3 Jun 2019 10:47:54 +0200 Subject: [PATCH 1/2] Fixed module_manager with Agent limit surpassed or license expired --- pandora_console/include/functions.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index f299153da6..a680ad9cba 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1392,6 +1392,11 @@ function enterprise_installed() { $return = false; + // Load enterprise extensions. + if (defined('DESTDIR')) { + return $return; + } + if (defined('PANDORA_ENTERPRISE')) { if (PANDORA_ENTERPRISE) { $return = true; @@ -1444,7 +1449,7 @@ function enterprise_include($filename) { global $config; - // Load enterprise extensions + // Load enterprise extensions. if (defined('DESTDIR')) { $destdir = DESTDIR; } else { @@ -1474,7 +1479,13 @@ function enterprise_include_once($filename) { global $config; - // Load enterprise extensions + // Load enterprise extensions. + if (defined('DESTDIR')) { + $destdir = DESTDIR; + } else { + $destdir = ''; + } + $filepath = realpath($config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename); if ($filepath === false) { From 8f2feac676c92c2ffed76494d2849e0bc71f6d48 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 18 Jun 2019 11:35:59 +0200 Subject: [PATCH 2/2] Added DESTDIR in license.php --- pandora_console/godmode/setup/license.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/license.php b/pandora_console/godmode/setup/license.php index f03d32ef0a..06d7d2e7e3 100644 --- a/pandora_console/godmode/setup/license.php +++ b/pandora_console/godmode/setup/license.php @@ -135,7 +135,9 @@ $table->data[9][0] = ''.__('Licensed to').''; $table->data[9][1] = html_print_input_text('licensed_to', $license['licensed_to'], '', 64, 255, true, true); html_print_table($table); -if (enterprise_installed()) { + +// If DESTDIR is defined the enterprise license is expired. +if (enterprise_installed() || defined('DESTDIR')) { echo '
'; html_print_input_hidden('update_settings', 1); html_print_submit_button(__('Validate'), 'update_button', false, 'class="sub upd"');