mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-24 19:41:28 +00:00
code cleanup, test for db_escape() crazyness in DB sanity check
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user