copy args function
darcs-hash:20080619141107-84dde-a5e018fdac3f72eee13b3093fbd871299cda0739.gz
This commit is contained in:
parent
08035caa5b
commit
0d8de282b2
|
@ -40,11 +40,7 @@ class Action { // lawsuit
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle($argarray) {
|
function handle($argarray) {
|
||||||
$strip = get_magic_quotes_gpc();
|
$this->args =& common_copy_args($argarray);
|
||||||
$this->args = array();
|
|
||||||
foreach ($argarray as $k => $v) {
|
|
||||||
$this->args[$k] = ($strip) ? stripslashes($v) : $v;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function boolean($key, $def=false) {
|
function boolean($key, $def=false) {
|
||||||
|
|
|
@ -95,7 +95,7 @@ function oid_get_user($openid_url) {
|
||||||
function oid_check_immediate($openid_url, $backto=NULL) {
|
function oid_check_immediate($openid_url, $backto=NULL) {
|
||||||
if (!$backto) {
|
if (!$backto) {
|
||||||
$action = $_REQUEST['action'];
|
$action = $_REQUEST['action'];
|
||||||
$args = clone($_GET);
|
$args = common_copy_args($_GET);
|
||||||
unset($args['action']);
|
unset($args['action']);
|
||||||
$backto = common_local_url($action, $args);
|
$backto = common_local_url($action, $args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -887,3 +887,12 @@ function common_config($main, $sub) {
|
||||||
global $config;
|
global $config;
|
||||||
return $config[$main][$sub];
|
return $config[$main][$sub];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function common_copy_args($from) {
|
||||||
|
$to = array();
|
||||||
|
$strip = get_magic_quotes_gpc();
|
||||||
|
foreach ($from as $k => $v) {
|
||||||
|
$to[$k] = ($strip) ? stripslashes($v) : $v;
|
||||||
|
}
|
||||||
|
return $to;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user