From 52848d414d63bbb57042741bd56d97a7fea06653 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 17 May 2025 22:51:44 +0200 Subject: Add info about PDO::ATTR_CLIENT_VERSION (#7591) Help with https://github.com/FreshRSS/FreshRSS/issues/7586 --- app/Models/DatabaseDAO.php | 5 +++++ app/views/index/about.phtml | 3 +++ 2 files changed, 8 insertions(+) (limited to 'app') diff --git a/app/Models/DatabaseDAO.php b/app/Models/DatabaseDAO.php index 5a25b74a0..fe922cb82 100644 --- a/app/Models/DatabaseDAO.php +++ b/app/Models/DatabaseDAO.php @@ -212,6 +212,11 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { return $version; } + public function pdoClientVersion(): string { + $version = $this->pdo->getAttribute(PDO::ATTR_CLIENT_VERSION); + return is_string($version) ? $version : ''; + } + final public function isMariaDB(): bool { // MariaDB includes its name in version, but not MySQL return str_contains($this->version(), 'MariaDB'); diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml index 9e56a1afe..096cfecd9 100644 --- a/app/views/index/about.phtml +++ b/app/views/index/about.phtml @@ -38,6 +38,9 @@
db['type'], ENT_NOQUOTES, 'UTF-8') ?>
version(), ENT_NOQUOTES, 'UTF-8') ?>
+ pdoClientVersion() !== $databaseDAO->version()): ?> +
pdoClientVersion(), ENT_NOQUOTES, 'UTF-8') ?>
+

-- cgit v1.2.3