A free, self-hostable news aggregator…
Fix sqlite_version (#7205)
Alexandre Alapetite7a79717e1024
diff --git a/app/Models/DatabaseDAO.php b/app/Models/DatabaseDAO.phpindex 5a58ea2ad..5a25b74a0 100644--- a/app/Models/DatabaseDAO.php+++ b/app/Models/DatabaseDAO.php@@ -197,13 +197,17 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo {self::$staticVersion = $version;}+ protected function selectVersion(): string {+ return $this->fetchValue('SELECT version()') ?? '';+ }+public function version(): string {if (self::$staticVersion !== null) {return self::$staticVersion;}static $version = null;if (!is_string($version)) {- $version = $this->fetchValue('SELECT version()') ?? '';+ $version = $this->selectVersion();}return $version;}diff --git a/app/Models/DatabaseDAOPGSQL.php b/app/Models/DatabaseDAOPGSQL.phpindex a183bdee6..3fa70cd88 100644--- a/app/Models/DatabaseDAOPGSQL.php+++ b/app/Models/DatabaseDAOPGSQL.php@@ -59,6 +59,11 @@ SQL;];}+ #[\Override]+ protected function selectVersion(): string {+ return $this->fetchValue('SELECT version()') ?? '';+ }+#[\Override]public function size(bool $all = false): int {if ($all) {diff --git a/app/Models/DatabaseDAOSQLite.php b/app/Models/DatabaseDAOSQLite.phpindex c425135b5..13c73a2d7 100644--- a/app/Models/DatabaseDAOSQLite.php+++ b/app/Models/DatabaseDAOSQLite.php@@ -72,6 +72,11 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO {];}+ #[\Override]+ protected function selectVersion(): string {+ return $this->fetchValue('SELECT sqlite_version()') ?? '';+ }+#[\Override]public function size(bool $all = false): int {$sum = 0;