Quote:
Originally Posted by Brad.loo
$_GET/$_REQUEST/$_POST/$_COOKIE => $vbulletin->GPC[]
|
I read the above, but still in the code, there are instances that vBulletin uses $_REQUEST.
Can someone shed some light on this? Based on the above, I changed a program to use $vbulletin->GPC instead of $_REQUEST and the program no longer works. Switched back to $_REQUEST and everything works fine.
I am puzzled.
I think I need to elaborate:
In the past, I was using this part of code:
PHP Code:
// ########################## REDIRECT ###############################
if ($_REQUEST['do'] == 'nextstep')
{
globalize($_REQUEST, array(
'action' => STR,
'done' => STR
));
if (empty($action))
{
define('CP_REDIRECT', THIS_SCRIPT . '.php');
}
else
{
define('CP_REDIRECT', THIS_SCRIPT . '.php?step=' . $action);
}
print_stop_message('redirecting_please_wait');
}
Now, the code has to be changed to:
PHP Code:
if ($_REQUEST['do'] == 'nextstep')
{
$vbulletin->input->clean_array_gpc('r', array(
'action'=> TYPE_STR,
'done'=> TYPE_STR,
));
if (empty($vbulletin->GPC['action']))
{
define('CP_REDIRECT', THIS_SCRIPT . '.php');
}
else
{
define('CP_REDIRECT', THIS_SCRIPT . '.php?step=' . $vbulletin->GPC['action']);
}
print_stop_message('redirecting_please_wait');
}
I found this after a lot of trials and errors. What's the reason for having to check for $_REQUEST['do'] in the first if, and then use $vbulletin->GPC in the next parts? Where do I use $_REQUEST and where $vbulletin->GPC????