mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-16 20:34:34 -04:00
Fix sqlite_version (#7205)
* Fix sqlite_version for https://github.com/FreshRSS/FreshRSS/pull/7161 * Fix PostgreSQL
This commit is contained in:
committed by
GitHub
parent
82b1d999dc
commit
7a79717e10
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user