mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
code cleanup, test for db_escape() crazyness in DB sanity check
This commit is contained in:
@@ -1980,6 +1980,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (db_escape_string("testTEST") != "testTEST") {
|
||||
$error_code = 12;
|
||||
}
|
||||
|
||||
error_reporting (DEFAULT_ERROR_LEVEL);
|
||||
|
||||
if ($error_code != 0) {
|
||||
@@ -5843,4 +5847,16 @@
|
||||
function feed_has_icon($id) {
|
||||
return is_file(ICONS_DIR . "/$id.ico") && filesize(ICONS_DIR . "/$id.ico") > 0;
|
||||
}
|
||||
|
||||
function init_connection($link) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user