1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Send the user to the default page if when logging under a weird logout edge case :P Fixes #143.

This commit is contained in:
Starbeamrainbowlabs 2017-07-25 20:16:51 +01:00
parent 00848d8a30
commit 5859a8dd70
2 changed files with 8 additions and 4 deletions

View file

@ -1563,8 +1563,10 @@ class page_renderer
$result .= "</span>"; $result .= "</span>";
//$result .= page_renderer::$nav_divider; //$result .= page_renderer::$nav_divider;
} }
else else {
$result .= "<span class='not-logged-in'><a href='index.php?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>Login</a></span>"; $returnto_url = $env->action !== "logout" ? $_SERVER["REQUEST_URI"] : "?action=view&page=" . rawurlencode($settings->defaultpage);
$result .= "<span class='not-logged-in'><a href='index.php?action=login&returnto=" . rawurlencode($returnto_url) . "'>Login</a></span>";
}
break; break;
case "search": // Renders the search bar case "search": // Renders the search bar

View file

@ -1202,8 +1202,10 @@ class page_renderer
$result .= "</span>"; $result .= "</span>";
//$result .= page_renderer::$nav_divider; //$result .= page_renderer::$nav_divider;
} }
else else {
$result .= "<span class='not-logged-in'><a href='index.php?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>Login</a></span>"; $returnto_url = $env->action !== "logout" ? $_SERVER["REQUEST_URI"] : "?action=view&page=" . rawurlencode($settings->defaultpage);
$result .= "<span class='not-logged-in'><a href='index.php?action=login&returnto=" . rawurlencode($returnto_url) . "'>Login</a></span>";
}
break; break;
case "search": // Renders the search bar case "search": // Renders the search bar