summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-18 15:48:22 +0300
committerAndrew Dolgov <[email protected]>2020-09-18 15:48:22 +0300
commit03a337a660a40263db0f3b5b5123cfa04f5c7505 (patch)
tree18bc4241a2784217803f78f43fe7b87727c6c8bb /include
parent3588d5186ef7321fa573adbb62f42b05d7a138be (diff)
add basic safe mode which doesn't load any user plugins
Diffstat (limited to 'include')
-rw-r--r--include/functions.php2
-rwxr-xr-xinclude/login_form.php8
2 files changed, 9 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 4031afa6e..0a02ff0d5 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -714,7 +714,7 @@
if (!$pluginhost) $pluginhost = PluginHost::getInstance();
- if ($owner_uid && SCHEMA_VERSION >= 100) {
+ if ($owner_uid && SCHEMA_VERSION >= 100 && !$_SESSION["safe_mode"]) {
$plugins = get_pref("_ENABLED_PLUGINS", $owner_uid);
$pluginhost->load($plugins, PluginHost::KIND_USER, $owner_uid);
diff --git a/include/login_form.php b/include/login_form.php
index 29fbe3aba..d2688d0ec 100755
--- a/include/login_form.php
+++ b/include/login_form.php
@@ -146,6 +146,14 @@
<?php echo __("Does not display images in articles, reduces automatic refreshes."); ?>
</div>
+ <fieldset class="narrow">
+ <label> </label>
+
+ <label ><input dojoType="dijit.form.CheckBox" name="safe_mode" id="safe_mode"
+ type="checkbox">
+ <?php echo __("Safe mode (no plugins)") ?></label>
+ </fieldset>
+
<?php if (SESSION_COOKIE_LIFETIME > 0) { ?>
<fieldset class="narrow">