mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Fix #40.
This commit is contained in:
parent
5ef0b1b7c9
commit
e191887bcb
3 changed files with 13 additions and 3 deletions
|
@ -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"]))
|
||||
{
|
||||
|
|
|
@ -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
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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"]))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue