Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.7
    • Fix Version/s: 3.0.8-RC1
    • Component/s: Login
    • Labels:
      None

      Description

      When we call login_box() function with $redirect parameter then are rendered two hidden fields - both named "redirect". First field come from $redirect parameter, second fields comes from

      {S_LOGIN_REDIRECT}

      and is hardcoded in page_header() function. First field value is overwriten by second field and redirection not work valid.

      Here is my solution for it:

      2942,2946d2941
      < 	if ($redirect)
      < 	{
      < 		$s_hidden_fields['redirect'] = $redirect;
      < 	}
      < 
      2964a2960
      > 		'S_LOGIN_REDIRECT'      => $redirect ? build_hidden_fields(array('redirect' => $redirect)) : null,
      4241c4237
      < 		'S_LOGIN_REDIRECT'		=> build_hidden_fields(array('redirect' => str_replace('&amp;', '&', build_url()))),
      ---
      > 		'S_LOGIN_REDIRECT'      => isset($template->_rootref['S_LOGIN_REDIRECT']) && $template->_rootref['S_LOGIN_REDIRECT'] ? $template->_rootref['S_LOGIN_REDIRECT'] : build_hidden_fields(array('redirect' => str_replace('&amp;', '&', build_url()))),
      

        Issue Links

          Activity

          Hide
          rxu Ruslan Uzdenov added a comment -

          Well the variant could be find

          	if ($redirect)
          	{
          		$s_hidden_fields['redirect'] = $redirect;
          	}

          and replace it with

          	$s_hidden_fields['redirect'] = ($redirect) ? $redirect : str_replace('&amp;', '&', build_url());

          Then we could try to get rid of S_LOGIN_REDIRECT in login_body.html.

          Show
          rxu Ruslan Uzdenov added a comment - Well the variant could be find if ($redirect) { $s_hidden_fields['redirect'] = $redirect; } and replace it with $s_hidden_fields['redirect'] = ($redirect) ? $redirect : str_replace('&amp;', '&', build_url()); Then we could try to get rid of S_LOGIN_REDIRECT in login_body.html.
          Hide
          nickvergessen Joas Schilling added a comment -

          rxu, if we dont put something into the S_LOGIN_REDIRECT, that wont hurt anything, when the redirect is set correct into the hidden field, as the LOGIN will jsut be empty and therefore won't even occure in the output at all. So outdated styles wouldnt have any problem at all.

          Show
          nickvergessen Joas Schilling added a comment - rxu, if we dont put something into the S_LOGIN_REDIRECT, that wont hurt anything, when the redirect is set correct into the hidden field, as the LOGIN will jsut be empty and therefore won't even occure in the output at all. So outdated styles wouldnt have any problem at all.
          Hide
          rxu Ruslan Uzdenov added a comment - - edited

          If we drop S_LOGIN_REDIRECT fully we'll have to introduce S_HIDDEN_FIELDS for index_body.html and viewforum_body.html, which will brake custom styles anyway.

          Show
          rxu Ruslan Uzdenov added a comment - - edited If we drop S_LOGIN_REDIRECT fully we'll have to introduce S_HIDDEN_FIELDS for index_body.html and viewforum_body.html, which will brake custom styles anyway.
          Hide
          peterkclee peterkclee added a comment -

          I proposed an unreviewed patch on 24/May/10 already.
          I think the patch should be ok, except missing the other style.

          Show
          peterkclee peterkclee added a comment - I proposed an unreviewed patch on 24/May/10 already. I think the patch should be ok, except missing the other style.
          Hide
          bantu Andreas Fischer added a comment -

          Replaced 'PHPBB-9117' with 'PHPBB3-9117', adjusted commit message to be no longer than 80 characters per line.

          Show
          bantu Andreas Fischer added a comment - Replaced 'PHPBB-9117' with 'PHPBB3-9117', adjusted commit message to be no longer than 80 characters per line.

            People

            • Assignee:
              rxu Ruslan Uzdenov
              Reporter:
              davidpl davidpl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development