Merge branch 'ent-4085-no-se-muestra-lista-de-modulos-con-licencia-invalida' into 'develop'

Fixed module_manager with Agent limit surpassed or license expired

See merge request artica/pandorafms!2475
This commit is contained in:
Daniel Rodriguez 2019-06-18 13:02:43 +02:00
commit c68f2ada94
2 changed files with 16 additions and 3 deletions

View File

@ -135,7 +135,9 @@ $table->data[9][0] = '<strong>'.__('Licensed to').'</strong>';
$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 '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_input_hidden('update_settings', 1);
html_print_submit_button(__('Validate'), 'update_button', false, 'class="sub upd"');

View File

@ -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) {