diff options
author | Heiko Adams <[email protected]> | 2016-08-19 17:25:05 +0200 |
---|---|---|
committer | Heiko Adams <[email protected]> | 2016-08-19 17:25:05 +0200 |
commit | 2842cf6e4563d1665741dd4c151798e6e282c60b (patch) | |
tree | 6aa8c94dd1d3ae81976dd154ee6ca46eb31908f1 /include/functions.php | |
parent | 94e3a9ab44d82e0d7052d5e2e40496230b5f21a4 (diff) | |
parent | c565a0cc21a6ee3e74ac9bc0cf4bfdde7cc84efd (diff) |
Merge branch 'master' into german-translation
Diffstat (limited to 'include/functions.php')
-rwxr-xr-x | include/functions.php | 13 |
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(); } } } |