From c97b93949475df00ae638fc13368c991c5ab0546 Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Sun, 10 Mar 2024 10:25:54 +1000 Subject: [PATCH] Improve config and permission change on en.inc. --- app/Config/OpenAudit.php | 13 +++---------- app/Views/lang/en.inc | 0 2 files changed, 3 insertions(+), 10 deletions(-) mode change 100644 => 100755 app/Views/lang/en.inc diff --git a/app/Config/OpenAudit.php b/app/Config/OpenAudit.php index 94819f5f0..d900fc032 100755 --- a/app/Config/OpenAudit.php +++ b/app/Config/OpenAudit.php @@ -28,6 +28,7 @@ class OpenAudit extends BaseConfig public string $enterprise_binary = ''; public string $homepage = 'summaries'; public string $nmis = ''; + public string $product = 'community'; public string $server_os = ''; public string $server_platform = ''; public bool $advanced_queries = true; @@ -64,8 +65,7 @@ public function __construct() $binaries = array(APPPATH . '../other/enterprise.exe'); } - $nmis = "/usr/local/nmis9"; - $this->nmis = (!empty(file_exists($nmis))) ? $nmis : ''; + $nmis = (!empty(file_exists('/usr/local/nmis9'))) ? '/usr/local/nmis9' : ''; $db = Database::connect(); $query = $db->query('SELECT * FROM `configuration`'); @@ -85,14 +85,7 @@ public function __construct() $this->license_string_collector_id = intval($row->id); } } - - if (!empty($this->oae_product)) { - $this->product = strtolower(str_replace('Open-AudIT ', '', $this->oae_product)); - } - if (empty($this->product)) { - $this->product = 'community'; - } - + $this->product = 'community'; if (!empty($this->servers)) { $this->servers = json_decode($this->servers); } diff --git a/app/Views/lang/en.inc b/app/Views/lang/en.inc old mode 100644 new mode 100755