Commit 9e709545 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1708959: Fixing test client for testing group creation"

parents 5ecdb0d8 df38a43e
......@@ -344,11 +344,13 @@ function testclient_parameters($paramdescription, $paramstring) {
* @param array ref $inputs
* @param array $parts
* @param string $value
* @param string $type
*/
function testclient_build_inputs(&$inputs, $parts, $value) {
function testclient_build_inputs(&$inputs, $parts, $value, $type=null) {
$part = array_shift($parts);
if (empty($parts)) {
if (!empty($value)) {
if ((trim($type) == 'int' && $value == '0') || !empty($value)) {
$inputs[$part] = $value;
}
return;
......@@ -361,7 +363,7 @@ function testclient_build_inputs(&$inputs, $parts, $value) {
if (!isset($inputs[$part])) {
$inputs[$part] = array();
}
testclient_build_inputs($inputs[$part], $parts, $value);
testclient_build_inputs($inputs[$part], $parts, $value, $type);
}
/**
......@@ -391,7 +393,7 @@ function testclient_submit(Pieform $form, $values) {
}
else {
$parts = explode('_', $name);
testclient_build_inputs($inputs, $parts, $values[$name]);
testclient_build_inputs($inputs, $parts, $values[$name], $var['type']);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment