Skip to content

Commit

Permalink
There were some bugs with allow_guestAccess set to false.
Browse files Browse the repository at this point in the history
Fixxed changing skins and now hiding quick access & search box.
  • Loading branch information
CleptoMan committed May 30, 2014
1 parent 7b1146e commit 49b250e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions core/html/index.template.php
Expand Up @@ -152,11 +152,14 @@ function template_header_after()

function template_search_box()
{
global $context;
global $context, $settings;

if (empty($context['allow_search']))
return;

if (we::$is_guest == true && $settings['allow_guestAccess'] == false)
return;

echo '
<form id="search_form" action="<URL>?action=search2" method="post" accept-charset="UTF-8">
<input type="search" name="search" value="" class="search">';
Expand Down Expand Up @@ -322,8 +325,10 @@ function template_side_maintenance()
// Show the Quick Access (JumpTo) select box.
function template_sidebar_quick_access()
{
global $txt;
global $txt, $settings;

if (we::$is_guest == true && $settings['allow_guestAccess'] == false)
return;
add_js('
new JumpTo("jump_to");');

Expand Down
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -217,7 +217,7 @@ function determine_action($action)
return 'KickGuest';
}
// The user might need to reagree to the agreement; post2 is here for draft compatibility, and PMs so that you can discuss said agreement.
elseif (!empty($settings['agreement_force']) && (we::$user['activated'] == 6 && !we::$is_admin) && (empty($action) || !in_array($action, array('login', 'login2', 'logout', 'reminder', 'activate', 'post2', 'pm'))))
elseif (!empty($settings['agreement_force']) && (we::$user['activated'] == 6 && !we::$is_admin) && (empty($action) || !in_array($action, array('login', 'login2', 'logout', 'reminder', 'activate', 'post2', 'pm', 'skin'))))
{
loadSource('Subs-Auth');
return 'Reagree';
Expand Down

0 comments on commit 49b250e

Please sign in to comment.