summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-17 14:23:35 +0400
committerAndrew Dolgov <[email protected]>2013-04-17 14:23:35 +0400
commitba68b6815ab31d17cda113e7990eeb07558b02a9 (patch)
tree4fc0d63a491619664bd520db1d44c1a9e5ad8d30 /include
parent9594791782bb9adbf29018c444ea427fbaeb5ee4 (diff)
db updates, remove init_connection()
Diffstat (limited to 'include')
-rw-r--r--include/functions.php38
1 files changed, 5 insertions, 33 deletions
diff --git a/include/functions.php b/include/functions.php
index 43138a1f9..0a686e71e 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -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'");
-
- if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) {
- db_query($link, "SET NAMES " . MYSQL_CHARSET);
- }
- }
-
- return true;
- }
-
- return false;
- }
-
- function init_connection($link) {
- if ($link) {
- init_connection_only($link);
-
- global $pluginhost;
+ function init_plugins($link) {
+ global $pluginhost;
- $pluginhost = new PluginHost($link);
- $pluginhost->load(PLUGINS, $pluginhost::KIND_ALL);
+ $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) {