diff options
author | Andrew Dolgov <[email protected]> | 2021-02-23 08:34:37 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-23 08:34:37 +0300 |
commit | 5229cc58b269bd04b2be7768107697063d95736e (patch) | |
tree | 6520dfaf81ec8eb818c4b66f3f348024466c6e00 /plugins | |
parent | 4ed91619ddefcaa2bf758361aaccf0844465228b (diff) | |
parent | cae54dad564bc1372f0f6cc11101b6377caef9a9 (diff) |
Merge branch 'wip-config-object'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/af_proxy_http/init.php | 2 | ||||
-rw-r--r-- | plugins/af_psql_trgm/init.php | 4 | ||||
-rwxr-xr-x | plugins/af_redditimgur/init.php | 2 | ||||
-rw-r--r-- | plugins/auth_internal/init.php | 2 | ||||
-rw-r--r-- | plugins/bookmarklets/init.php | 4 | ||||
-rwxr-xr-x | plugins/cache_starred_images/init.php | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/plugins/af_proxy_http/init.php b/plugins/af_proxy_http/init.php index a5ba1d62d..b03cacfe4 100644 --- a/plugins/af_proxy_http/init.php +++ b/plugins/af_proxy_http/init.php @@ -68,7 +68,7 @@ class Af_Proxy_Http extends Plugin { header("Location: " . $this->cache->get_url($local_filename)); return; } else { - $data = UrlHelper::fetch(["url" => $url, "max_size" => MAX_CACHE_FILE_SIZE]); + $data = UrlHelper::fetch(["url" => $url, "max_size" => Config::get(Config::MAX_CACHE_FILE_SIZE)]); if ($data) { if ($this->cache->put($local_filename, $data)) { diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php index 3b7ed6b14..5611d8998 100644 --- a/plugins/af_psql_trgm/init.php +++ b/plugins/af_psql_trgm/init.php @@ -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; diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 9e43b255f..7d5aeff5a 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -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)"; diff --git a/plugins/auth_internal/init.php b/plugins/auth_internal/init.php index 6a68534ea..13a7bc969 100644 --- a/plugins/auth_internal/init.php +++ b/plugins/auth_internal/init.php @@ -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'); diff --git a/plugins/bookmarklets/init.php b/plugins/bookmarklets/init.php index caa8b39df..967918823 100644 --- a/plugins/bookmarklets/init.php +++ b/plugins/bookmarklets/init.php @@ -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(); } diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index 9f17c492f..2dbdb99cc 100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -136,7 +136,7 @@ class Cache_Starred_Images extends Plugin { if (!$this->cache->exists($local_filename)) { Debug::log("cache_images: downloading: $url to $local_filename", Debug::$LOG_VERBOSE); - $data = UrlHelper::fetch(["url" => $url, "max_size" => MAX_CACHE_FILE_SIZE]); + $data = UrlHelper::fetch(["url" => $url, "max_size" => Config::get(Config::MAX_CACHE_FILE_SIZE)]); if ($data) return $this->cache->put($local_filename, $data);; |