mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 06:45:54 +00:00
wip: initial for config object
This commit is contained in:
@@ -134,7 +134,7 @@ class Af_Psql_Trgm extends Plugin {
|
||||
title="<i class='material-icons'>extension</i> <?= __('Mark similar articles as read (af_psql_trgm)') ?>">
|
||||
|
||||
<?php
|
||||
if (DB_TYPE != "pgsql") {
|
||||
if (Config::get(Config::DB_TYPE) != "pgsql") {
|
||||
print_error("Database type not supported.");
|
||||
} else {
|
||||
$res = $this->pdo->query("select 'similarity'::regproc");
|
||||
@@ -258,7 +258,7 @@ class Af_Psql_Trgm extends Plugin {
|
||||
|
||||
function hook_article_filter($article) {
|
||||
|
||||
if (DB_TYPE != "pgsql") return $article;
|
||||
if (Config::get(Config::DB_TYPE) != "pgsql") return $article;
|
||||
|
||||
$res = $this->pdo->query("select 'similarity'::regproc");
|
||||
if (!$res || !$res->fetch()) return $article;
|
||||
|
||||
@@ -530,7 +530,7 @@ class Af_RedditImgur extends Plugin {
|
||||
$entry_guid = $article["guid_hashed"];
|
||||
$owner_uid = $article["owner_uid"];
|
||||
|
||||
if (DB_TYPE == "pgsql") {
|
||||
if (Config::get(Config::DB_TYPE) == "pgsql") {
|
||||
$interval_qpart = "date_entered < NOW() - INTERVAL '1 day'";
|
||||
} else {
|
||||
$interval_qpart = "date_entered < DATE_SUB(NOW(), INTERVAL 1 DAY)";
|
||||
|
||||
@@ -244,7 +244,7 @@ class Auth_Internal extends Auth_Base {
|
||||
$tpl->readTemplateFromFile("password_change_template.txt");
|
||||
|
||||
$tpl->setVariable('LOGIN', $row["login"]);
|
||||
$tpl->setVariable('TTRSS_HOST', SELF_URL_PATH);
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
|
||||
|
||||
$tpl->addBlock('message');
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class Bookmarklets extends Plugin {
|
||||
}
|
||||
|
||||
function subscribe() {
|
||||
if (SINGLE_USER_MODE) {
|
||||
if (Config::get(Config::SINGLE_USER_MODE)) {
|
||||
UserHelper::login_sequence();
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class Bookmarklets extends Plugin {
|
||||
}
|
||||
|
||||
function sharepopup() {
|
||||
if (SINGLE_USER_MODE) {
|
||||
if (Config::get(Config::SINGLE_USER_MODE)) {
|
||||
UserHelper::login_sequence();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user