What does $redirect do in mcp functions?

Discussion forum for MOD Writers regarding MOD Development.
Locked
dokeyfunk
Registered User
Posts: 41
Joined: Wed Jan 10, 2007 5:14 pm

What does $redirect do in mcp functions?

Post by dokeyfunk » Mon Nov 22, 2010 12:48 pm

Hey, I'm working on a MOD and stumbled upon this code in the mcp scripts:

In ./includes/mcp/mcp_topic.php, for example, the functionsplit_topic have these last lines:

Code: Select all

$redirect = request_var('redirect', "index.$phpEx");
	$redirect = reapply_sid($redirect);

	if (!$success_msg)
	{
		return;
	}
	else
	{
		meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&t=$to_topic_id"));
		trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
	}
//ENDOF FUNCTION 
The $redirect value seems to not be used at all, and it isn't global or in a loop, so it isn't passed on. What does it actually do in this instance?

Ather
Registered User
Posts: 1032
Joined: Fri May 08, 2009 9:42 am
Location: Kingdom of Bahrain
Name: Ather Akber

Re: What does $redirect do in mcp functions?

Post by Ather » Mon Nov 22, 2010 1:00 pm

im guessing its called after you sticky/delete a post, because once you delete a post, it takes you back to the forum the post was in.. but i could be wrong :oops:
CPL Syed Ather Akbar
Regional Command Southwest
Camp Leatherneck, Afghanistan

My Mods/Snippets

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51824
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: What does $redirect do in mcp functions?

Post by Brf » Mon Nov 22, 2010 1:11 pm

You are correct. It does not appear to do anything. Report it to Bug Tracker

dokeyfunk
Registered User
Posts: 41
Joined: Wed Jan 10, 2007 5:14 pm

Re: What does $redirect do in mcp functions?

Post by dokeyfunk » Mon Nov 22, 2010 1:43 pm


Locked

Return to “[3.0.x] MOD Writers Discussion”