mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-27 05:28:38 -04:00
Fix PostgreSQL size bug for uppercase (#2631)
Crash for users with uppercase letters
This commit is contained in:
1 parent
2495172a05
commit
122e4b412a
1 file changed
+9
-6
@@ -58,14 +58,17 @@ class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite {
|
||||
$stm->execute();
|
||||
} else {
|
||||
$sql = "SELECT "
|
||||
. "pg_total_relation_size('{$this->pdo->prefix()}category') + "
|
||||
. "pg_total_relation_size('{$this->pdo->prefix()}feed') + "
|
||||
. "pg_total_relation_size('{$this->pdo->prefix()}entry') + "
|
||||
. "pg_total_relation_size('{$this->pdo->prefix()}entrytmp') + "
|
||||
. "pg_total_relation_size('{$this->pdo->prefix()}tag') + "
|
||||
. "pg_total_relation_size('{$this->pdo->prefix()}entrytag')";
|
||||
. "pg_total_relation_size('`{$this->pdo->prefix()}category`') + "
|
||||
. "pg_total_relation_size('`{$this->pdo->prefix()}feed`') + "
|
||||
. "pg_total_relation_size('`{$this->pdo->prefix()}entry`') + "
|
||||
. "pg_total_relation_size('`{$this->pdo->prefix()}entrytmp`') + "
|
||||
. "pg_total_relation_size('`{$this->pdo->prefix()}tag`') + "
|
||||
. "pg_total_relation_size('`{$this->pdo->prefix()}entrytag`')";
|
||||
$stm = $this->pdo->query($sql);
|
||||
}
|
||||
if ($stm == false) {
|
||||
return 0;
|
||||
}
|
||||
$res = $stm->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
return $res[0];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user