From e4107ac9520ca404d4ab49ef79ca74430e8fd772 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 22 Feb 2021 21:47:48 +0300 Subject: wip: initial for config object --- classes/article.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes/article.php') diff --git a/classes/article.php b/classes/article.php index acd83694c..a2a38118b 100755 --- a/classes/article.php +++ b/classes/article.php @@ -85,7 +85,7 @@ class Article extends Handler_Protected { content = ?, content_hash = ? WHERE id = ?"); $sth->execute([$content, $content_hash, $ref_id]); - if (DB_TYPE == "pgsql"){ + if (Config::get(Config::DB_TYPE) == "pgsql") { $sth = $pdo->prepare("UPDATE ttrss_entries SET tsvector_combined = to_tsvector( :ts_content) WHERE id = :id"); @@ -130,7 +130,7 @@ class Article extends Handler_Protected { if ($row = $sth->fetch()) { $ref_id = $row["id"]; - if (DB_TYPE == "pgsql"){ + if (Config::get(Config::DB_TYPE) == "pgsql"){ $sth = $pdo->prepare("UPDATE ttrss_entries SET tsvector_combined = to_tsvector( :ts_content) WHERE id = :id"); @@ -475,7 +475,7 @@ class Article extends Handler_Protected { // purge orphaned posts in main content table - if (DB_TYPE == "mysql") + if (Config::get(Config::DB_TYPE) == "mysql") $limit_qpart = "LIMIT 5000"; else $limit_qpart = ""; -- cgit v1.2.3