mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:55:56 +00:00
wip: initial for config object
This commit is contained in:
@@ -8,9 +8,9 @@ class Digest
|
||||
|
||||
Debug::log("Sending digests, batch of max $user_limit users, headline limit = $limit");
|
||||
|
||||
if (DB_TYPE == "pgsql") {
|
||||
if (Config::get(Config::DB_TYPE) == "pgsql") {
|
||||
$interval_qpart = "last_digest_sent < NOW() - INTERVAL '1 days'";
|
||||
} else /* if (DB_TYPE == "mysql") */ {
|
||||
} else /* if (Config::get(Config::DB_TYPE) == "mysql") */ {
|
||||
$interval_qpart = "last_digest_sent < DATE_SUB(NOW(), INTERVAL 1 DAY)";
|
||||
}
|
||||
|
||||
@@ -91,19 +91,19 @@ class Digest
|
||||
|
||||
$tpl->setVariable('CUR_DATE', date('Y/m/d', $local_ts));
|
||||
$tpl->setVariable('CUR_TIME', date('G:i', $local_ts));
|
||||
$tpl->setVariable('TTRSS_HOST', SELF_URL_PATH);
|
||||
$tpl->setVariable('TTRSS_HOST', Config::get(Config.Config::get(Config::SELF_URL_PATH)));
|
||||
|
||||
$tpl_t->setVariable('CUR_DATE', date('Y/m/d', $local_ts));
|
||||
$tpl_t->setVariable('CUR_TIME', date('G:i', $local_ts));
|
||||
$tpl_t->setVariable('TTRSS_HOST', SELF_URL_PATH);
|
||||
$tpl_t->setVariable('TTRSS_HOST', Config::get(Config.Config::get(Config::SELF_URL_PATH)));
|
||||
|
||||
$affected_ids = array();
|
||||
|
||||
$days = (int) $days;
|
||||
|
||||
if (DB_TYPE == "pgsql") {
|
||||
if (Config::get(Config::DB_TYPE) == "pgsql") {
|
||||
$interval_qpart = "ttrss_entries.date_updated > NOW() - INTERVAL '$days days'";
|
||||
} else /* if (DB_TYPE == "mysql") */ {
|
||||
} else /* if (Config::get(Config::DB_TYPE) == "mysql") */ {
|
||||
$interval_qpart = "ttrss_entries.date_updated > DATE_SUB(NOW(), INTERVAL $days DAY)";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user