summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.php')
-rwxr-xr-xinclude/functions.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php
index d6bd5fb73..3902ac45a 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -16,7 +16,9 @@
libxml_disable_entity_loader(true);
- mb_internal_encoding("UTF-8");
+ // separate test because this is included before sanity checks
+ if (function_exists("mb_internal_encoding")) mb_internal_encoding("UTF-8");
+
date_default_timezone_set('UTC');
if (defined('E_DEPRECATED')) {
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
@@ -831,14 +833,17 @@
return $csrf_token == $_SESSION['csrf_token'];
}
- function load_user_plugins($owner_uid) {
+ function load_user_plugins($owner_uid, $pluginhost = false) {
+
+ if (!$pluginhost) $pluginhost = PluginHost::getInstance();
+
if ($owner_uid && SCHEMA_VERSION >= 100) {
$plugins = get_pref("_ENABLED_PLUGINS", $owner_uid);
- PluginHost::getInstance()->load($plugins, PluginHost::KIND_USER, $owner_uid);
+ $pluginhost->load($plugins, PluginHost::KIND_USER, $owner_uid);
if (get_schema_version() > 100) {
- PluginHost::getInstance()->load_data();
+ $pluginhost->load_data();
}
}
}