Unset xmlrpcauth and not the first member of the array.

This commit is contained in:
Ermal 2011-03-30 21:49:51 +00:00
parent cb0e3f8e7c
commit ccf46756fd

View File

@ -117,7 +117,7 @@ function xmlrpc_auth(&$params) {
if (authenticate_user("admin", $params[0], $authcfg) ||
authenticate_user("admin", $params[0])) {
array_shift($params);
unset($params['0']);
unset($params['xmlrpcauth']);
return true;
} else if (authenticate_user("admin", $params['xmlrpcauth'], $authcfg) ||
authenticate_user("admin", $params['xmlrpcauth'])) {
@ -127,7 +127,7 @@ function xmlrpc_auth(&$params) {
}
} else if (authenticate_user("admin", $params[0])) {
array_shift($params);
unset($params['0']);
unset($params['xmlrpcauth']);
return true;
} else if (authenticate_user("admin", $params['xmlrpcauth'])) {
array_shift($params);