]> git.wh0rd.org - tt-rss.git/blobdiff - update_feeds.php
update_rss_feed: properly define
[tt-rss.git] / update_feeds.php
old mode 100644 (file)
new mode 100755 (executable)
index 4b6ad3c..6a4aa2a
@@ -1,9 +1,5 @@
 #!/usr/bin/php
 <?php
-       // this script is probably run not from your httpd-user, so cache
-       // directory defined in config.php won't be accessible
-       define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache-cli');
-       define('SIMPLEPIE_CACHE_DIR',   '/var/tmp/simplepie-ttrss-cache-cli');
        define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
        define('DISABLE_SESSIONS', true);
 
                return;
        }
 
-       if (DB_TYPE == "pgsql") {
-               pg_query("set client_encoding = 'utf-8'");
-               pg_set_client_encoding("UNICODE");
-       } else {
-               if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) {
-                       db_query($link, "SET NAMES " . MYSQL_CHARSET);
-//                     db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET);
-               }
-       }
+       init_connection($link);
 
        // Update all feeds needing a update.
-       update_daemon_common($link, $limit=0);
-
-       // Send feed digests by email if needed.
-       if (DAEMON_SENDS_DIGESTS) send_headlines_digests($link);
+       update_daemon_common($link);
 
        db_close($link);