Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/9918] $redirect variable used from now #722

Merged
merged 2 commits into from
Nov 7, 2012
Merged

[ticket/9918] $redirect variable used from now #722

merged 2 commits into from
Nov 7, 2012

Conversation

senky
Copy link
Contributor

@senky senky commented Apr 9, 2012

According to comment marc1706 added to tracker
http://tracker.phpbb.com/browse/PHPBB3-9918?focusedCommentId=35120&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-35120
I changed files to fit his second advice - redirect is kept in hidden_fields and other code changed.

http://tracker.phpbb.com/browse/PHPBB3-9918

According to comment marc1706 added to tracker
http://tracker.phpbb.com/browse/PHPBB3-9918?focusedCommentId=35120&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-35120
I changed files to fit his second advice - redirect is kept in hidden_fields and other code changed.

PHPBB3-9918
@@ -433,7 +433,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
confirm_box(false, 'MERGE_TOPICS', $s_hidden_fields);
}

$redirect = request_var('redirect', "index.$phpEx");
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&t=$to_topic_id");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of, the default link should be one string or you should use append_sid(). Either way, you'll need to run reapply_sid() on the $redirect link afterwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New commit changes this to one string starting with:
{$phpbb_root_path}viewtopic.$phpEx?f=

I know this is not preffered in phpBB, but I do not see any point in calling append_sid just because of conventions. I hope that this change is acceptable...

As per marc1706's note, all request_var functions now have only one string in default value

PHPBB3-9918
@p-scratch
Copy link

I'm guessing sid still has to be applied.

@senky
Copy link
Contributor Author

senky commented May 10, 2012

SID is applied on lines looking like this:

$redirect = reapply_sid($redirect);

or am I wrong?

p added a commit to p/phpbb3 that referenced this pull request Nov 7, 2012
* Senky/ticket/9918:
  [ticket/9918] default values in request_var changed to one string
  [ticket/9918] $redirect variable used from now
@p p merged commit 807eccc into phpbb:develop Nov 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants