Commit a61c66ed authored by Son Nguyen's avatar Son Nguyen Committed by Robert Lyon

Checking incorrect names for leap2a interactive import options (Bug 1361005)

While the IDs for the radio buttons are of the form "decision_X_X", we're
looking at their names here, not IDs. And the names are just "decision_X".

Change-Id: Id7e0ec1df62cca6cae261b9b7eda9fbe3dbf9431
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent e4902c53
...@@ -243,7 +243,7 @@ function save_decisions() { ...@@ -243,7 +243,7 @@ function save_decisions() {
// many dynamically-generated fields created by the import items form. // many dynamically-generated fields created by the import items form.
foreach ($_POST as $key => $value) { foreach ($_POST as $key => $value) {
if ( if (
preg_match('/^decision_(\d+)_\d+$/', $key, $m) preg_match('/^decision_(\d+)$/', $key, $m)
&& in_array( && in_array(
$value, $value,
array(PluginImport::DECISION_ADDNEW, PluginImport::DECISION_APPEND, PluginImport::DECISION_REPLACE, PluginImport::DECISION_IGNORE) array(PluginImport::DECISION_ADDNEW, PluginImport::DECISION_APPEND, PluginImport::DECISION_REPLACE, PluginImport::DECISION_IGNORE)
......
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