]>
git.wh0rd.org - tt-rss.git/blob - update_feeds.php
318a955ed0db62889206181e27a6a19f02de988a
3 // this script is probably run not from your httpd-user, so cache
4 // directory defined in config.php won't be accessible
5 define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache-cli');
7 define('DISABLE_SESSIONS', true);
9 require_once "sanity_check.php";
10 require_once "config.php";
11 require_once "db.php";
12 require_once "db-prefs.php";
13 require_once "functions.php";
14 require_once "magpierss/rss_fetch.inc";
16 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
19 if (DB_TYPE
== "mysql") {
22 // PG seems to display its own errors just fine by default.
26 if (DB_TYPE
== "pgsql") {
27 pg_query("set client_encoding = 'utf-8'");
28 pg_set_client_encoding("UNICODE");
31 $result = db_query($link, "SELECT id FROM ttrss_users");
33 while ($line = db_fetch_assoc($result)) {
34 $user_id = $line["id"];
35 initialize_user_prefs($link, $user_id);
36 update_all_feeds($link, false, $user_id, true);
39 if (DAEMON_SENDS_DIGESTS
) send_headlines_digests($link);