mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 08:25:54 +00:00
db updates, remove init_connection()
This commit is contained in:
@@ -3371,41 +3371,13 @@
|
||||
return is_file(ICONS_DIR . "/$id.ico") && filesize(ICONS_DIR . "/$id.ico") > 0;
|
||||
}
|
||||
|
||||
function init_connection_only($link) {
|
||||
if ($link) {
|
||||
if (DB_TYPE == "pgsql") {
|
||||
pg_query($link, "set client_encoding = 'UTF-8'");
|
||||
pg_set_client_encoding("UNICODE");
|
||||
pg_query($link, "set datestyle = 'ISO, european'");
|
||||
pg_query($link, "set TIME ZONE 0");
|
||||
} else {
|
||||
db_query($link, "SET time_zone = '+0:0'");
|
||||
function init_plugins($link) {
|
||||
global $pluginhost;
|
||||
|
||||
if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) {
|
||||
db_query($link, "SET NAMES " . MYSQL_CHARSET);
|
||||
}
|
||||
}
|
||||
$pluginhost = new PluginHost($link);
|
||||
$pluginhost->load(PLUGINS, $pluginhost::KIND_ALL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function init_connection($link) {
|
||||
if ($link) {
|
||||
init_connection_only($link);
|
||||
|
||||
global $pluginhost;
|
||||
|
||||
$pluginhost = new PluginHost($link);
|
||||
$pluginhost->load(PLUGINS, $pluginhost::KIND_ALL);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
print "Unable to connect to database:" . db_last_error();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function format_tags_string($tags, $id) {
|
||||
|
||||
Reference in New Issue
Block a user