From 4389c8a2aa17708d48b90dc9d7b18532b6ed60c8 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 30 Aug 2024 17:34:30 +0200 Subject: [PATCH] lib/php/db.php --- lib/php/db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/php/db.php b/lib/php/db.php index 7eba7704..f9a99eba 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -1159,12 +1159,13 @@ class Db extends nb { public function status() { $status = $new = []; + $server = isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : 'localhost'; $new = [] +[ 'id' => (empty($this->id) ? '' : $this->id), 'name' => $this->name, 'type' => $this->type, - 'host' => $this->host, + 'host' => ($this->type == 'sqlite' ? $server.':' : '').$this->host, 'tables' => count($this->tables()), ] +($this->conf_type('use_path') ? [] : [ -- 2.47.3