diff options
author | Andrew Dolgov <[email protected]> | 2008-11-10 06:29:19 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-11-10 06:29:19 +0100 |
commit | f29ba1484f4a230651a40f4b3e26444d9748453f (patch) | |
tree | 0b8d66229a08600986654a060ad2128b6d07f130 /update_daemon.php | |
parent | d2bf48f90ad1997406708811c45163567b9c3ff0 (diff) |
code cleanup, test for db_escape() crazyness in DB sanity check
Diffstat (limited to 'update_daemon.php')
-rw-r--r-- | update_daemon.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/update_daemon.php b/update_daemon.php index 67a8781de..35177edd6 100644 --- a/update_daemon.php +++ b/update_daemon.php @@ -57,6 +57,8 @@ "Maybe another daemon is already running.\n"); } + // Testing database connection. + // It is unnecessary to start the fork loop if database is not ok. $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); if (!$link) { @@ -67,16 +69,6 @@ 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); - } - } - db_close($link); $last_purge = 0; |