$fetch_last_content_type = false;
$pluginhost = false;
- function __autoload($class) {
- $class_file = str_replace("_", "/", strtolower(basename($class)));
-
- $file = dirname(__FILE__)."/../classes/$class_file.php";
-
- if (file_exists($file)) {
- require $file;
- }
-
- }
-
mb_internal_encoding("UTF-8");
date_default_timezone_set('UTC');
if (defined('E_DEPRECATED')) {
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) {