diff options
author | Andrew Dolgov <[email protected]> | 2010-11-09 16:33:08 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-09 16:33:08 +0300 |
commit | 661135c742cc31bc0eece3bb669dad707d0aff66 (patch) | |
tree | 8656af87b9ddb003942083d3233abb36090fba1d /update_feeds.php | |
parent | e75df19d5061bde98acdb1fcca7b8471097c6d92 (diff) |
unify update_daemon, update_feeds and update_feedbrowser into update.php; move update.php to db-updater.php
Diffstat (limited to 'update_feeds.php')
-rwxr-xr-x | update_feeds.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/update_feeds.php b/update_feeds.php deleted file mode 100755 index 6a4aa2a1b..000000000 --- a/update_feeds.php +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/php -<?php - define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE); - define('DISABLE_SESSIONS', true); - - error_reporting(DEFAULT_ERROR_LEVEL); - - require_once "sanity_check.php"; - require_once "config.php"; - require_once "db.php"; - require_once "db-prefs.php"; - require_once "functions.php"; - - $lock_filename = "update_feeds.lock"; - - $lock_handle = make_lockfile($lock_filename); - - // Try to lock a file in order to avoid concurrent update. - if (!$lock_handle) { - die("error: Can't create lockfile ($lock_filename). ". - "Maybe another process is already running.\n"); - } - - // Create a database connection. - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - - if (!$link) { - if (DB_TYPE == "mysql") { - print mysql_error(); - } - // PG seems to display its own errors just fine by default. - return; - } - - init_connection($link); - - // Update all feeds needing a update. - update_daemon_common($link); - - db_close($link); - - unlink(LOCK_DIRECTORY . "/$lock_filename"); -?> |