diff options
| author | 2019-11-06 21:54:13 +0100 | |
|---|---|---|
| committer | 2019-11-06 21:54:13 +0100 | |
| commit | 91cb165829badde07c42a002215cf52779d891b6 (patch) | |
| tree | b8ee6e04e32dcf6c6fc25b7b0b9fe2952d2991ba /app/Models/DatabaseDAOPGSQL.php | |
| parent | 3aa66f317b496ccd9a2df914bbc747c52081a7ad (diff) | |
| parent | 6d596e9e54308297d423b23bf65338d62eebc415 (diff) | |
Merge pull request #2633 from FreshRSS/dev1.15.1
FreshRSS 1.15.1
Diffstat (limited to 'app/Models/DatabaseDAOPGSQL.php')
| -rw-r--r-- | app/Models/DatabaseDAOPGSQL.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/app/Models/DatabaseDAOPGSQL.php b/app/Models/DatabaseDAOPGSQL.php index 1a6b3599e..7ca7799ae 100644 --- a/app/Models/DatabaseDAOPGSQL.php +++ b/app/Models/DatabaseDAOPGSQL.php @@ -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]; } |
