1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00
This commit is contained in:
Starbeamrainbowlabs 2015-11-14 16:00:51 +00:00
parent 5ef0b1b7c9
commit e191887bcb
3 changed files with 13 additions and 3 deletions

View file

@ -1373,7 +1373,12 @@ register_module([
}
page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) {
global $settings, $pageindex;
global $settings, $pageindex, $env;
// Don't render a sidebar if the user is logging in and a login is
// required in order to view pages.
if($settings->require_login_view && in_array($env->action, [ "login", "checklogin" ]))
return false;
if($show_sidebar && !isset($_GET["printable"]))
{

View file

@ -32,7 +32,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds a sidebar to the left hand side of every page. Add '$settings->sidebar_show = true;' to your configuration, or append '&sidebar=yes' to the url to enable. Adding to the url sets a cookie to remember your setting.",
"id": "extra-sidebar",
"lastupdate": 1445170746,
"lastupdate": 1447516807,
"optional": false
},
{

View file

@ -35,7 +35,12 @@ register_module([
}
page_renderer::register_part_preprocessor(function(&$parts) use ($show_sidebar) {
global $settings, $pageindex;
global $settings, $pageindex, $env;
// Don't render a sidebar if the user is logging in and a login is
// required in order to view pages.
if($settings->require_login_view && in_array($env->action, [ "login", "checklogin" ]))
return false;
if($show_sidebar && !isset($_GET["printable"]))
{