diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 52fab8f914..3f2c4cad22 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -483,7 +483,7 @@ class Diagnostics extends Wizard ], 'isEnterprise' => [ 'name' => __('Enterprise installed'), - 'value' => (enterprise_installed()) ? __('true') : __('false'), + 'value' => $this->getStatusLicense(), ], 'customerKey' => [ 'name' => __('Update Key'), @@ -505,6 +505,29 @@ class Diagnostics extends Wizard } + /** + * Return status of license. + * + * @return string + */ + private function getStatusLicense():string + { + global $config; + + if (enterprise_installed() === true) { + if (isset($config['license_mode']) + && (int) $config['license_mode'] === 1 + ) { + return __('FREE/TRIAL'); + } else { + return __('LICENSED'); + } + } else { + return __('OpenSource'); + } + } + + /** * PHP Status. * diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php index f78b94d188..5c41828e11 100755 --- a/pandora_console/include/functions_update_manager.php +++ b/pandora_console/include/functions_update_manager.php @@ -98,25 +98,6 @@ function update_manager_get_current_package() } -/** - * Check if a trial license is in use. - * - * @return boolean true if a trial license is in use, false otherwise. - */ -function update_manager_verify_trial() -{ - global $config; - - if (isset($config['license_licensed_to']) - && strstr($config['license_licensed_to'], 'info@pandorafms.com') !== false - ) { - return true; - } - - return false; -} - - /** * Checks if there are packages available to be installed. *