Redirect module function
Posted: Wed Aug 24, 2005 12:11 pm
Dear all,
it seems that the 'Redirect' function for a module has this & in the redirecting.
I have made this function in addition:
Wishy I took out the amp after &'s is this correct?
This seems to work and bring the browser to the appropriate action for the appropriate module for this call in module code.
$this->Redirect( $id , 'some_action', $resultid );
it seems that the 'Redirect' function for a module has this & in the redirecting.
I have made this function in addition:
Code: Select all
function RedirectNoAmp( $id, $action, $returnid='')
{
global $gCms;
$config = $gCms->config;
$name = $this->GetName();
$text = 'moduleinterface.php?module='.$name.'&'.$id.'action='.$action.'&id='.$id;
if ($returnid != '')
{
$text .= '&'.$id.'returnid='.$returnid;
}
redirect($text);
}
This seems to work and bring the browser to the appropriate action for the appropriate module for this call in module code.
$this->Redirect( $id , 'some_action', $resultid );