Skip to content

Commit

Permalink
Improve config and permission change on en.inc.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Mar 10, 2024
1 parent d0590a9 commit c97b939
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions app/Config/OpenAudit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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`');
Expand All @@ -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);
}
Expand Down
Empty file modified app/Views/lang/en.inc
100644 → 100755
Empty file.

0 comments on commit c97b939

Please sign in to comment.