From 5f11c0b9bc7f619135256cc863abb668777f0954 Mon Sep 17 00:00:00 2001 From: Kenio de Souza Date: Mon, 25 Aug 2025 17:17:14 -0300 Subject: [PATCH] Atualizando Server.class.php --- vendor/action/log/log_save.php | 3 ++- vendor/model/Database.class.php | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/vendor/action/log/log_save.php b/vendor/action/log/log_save.php index 94217ac..691c192 100644 --- a/vendor/action/log/log_save.php +++ b/vendor/action/log/log_save.php @@ -252,7 +252,8 @@ try { if(!$Database->Save($clientId, $jsonLog->database->file_size_mb, $jsonLog->database->last_modified, - $jsonLog->database->db_accessible)){ + $jsonLog->database->db_accessible, + json_encode($jsonLog->database->partition))){ /** Informo */ throw new InvalidArgumentException('Não foi possível atualizar as informações de banco de dados', 0); diff --git a/vendor/model/Database.class.php b/vendor/model/Database.class.php index 31fe3bd..e09bd9b 100644 --- a/vendor/model/Database.class.php +++ b/vendor/model/Database.class.php @@ -39,6 +39,7 @@ class Database private $fileSize = null; private $lastModified = null; private $dbAccessible = null; + private $dbPartition = null; /** Construtor da classe */ function __construct() @@ -112,7 +113,8 @@ class Database public function Save(int $clientId, ? string $fileSize, ? string $lastModified, - ? string $dbAccessible) + ? string $dbAccessible, + ? string $dbPartition) { @@ -121,16 +123,19 @@ class Database $this->fileSize = $fileSize; $this->lastModified = $lastModified; $this->dbAccessible = $dbAccessible; + $this->dbPartition = $dbPartition; /** Consulta SQL */ $this->sql = 'insert into db(client_id, file_size, last_modified, - db_accessible + db_accessible, + db_partition ) values (:client_id, :file_size, :last_modified, - :db_accessible)'; + :db_accessible, + :db_partition)'; try{ @@ -145,6 +150,7 @@ class Database $this->stmt->bindParam(':file_size', $this->fileSize); $this->stmt->bindParam(':last_modified', $this->lastModified); $this->stmt->bindParam(':db_accessible', $this->dbAccessible); + $this->stmt->bindParam(':db_partition', $this->dbPartition); /** Executo o SQL */ $this->stmt->execute();