Unverified Commit 78c7028f authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(management) Fix subaction detection when there is a number in action name

This fixes ldap2zone action.

issue #6180
Showing with 4 additions and 6 deletions
+4 -6
......@@ -484,9 +484,8 @@ class managementListing
unset($_REQUEST['dn']);
}
if (preg_match('/^([a-zA-Z]+)_([a-zA-Z_]+)$/', $result['action'], $m)) {
$result['action'] = $m[1];
$result['subaction'] = $m[2];
if (strpos($result['action'], '_') !== FALSE) {
list($result['action'], $result['subaction']) = explode('_', $result['action'], 2);
}
return $result;
}
......@@ -524,9 +523,8 @@ class managementListing
}
}
if (preg_match('/^([a-zA-Z\.]+)_([a-zA-Z_\.]+)$/', $result['action'], $m)) {
$result['action'] = $m[1];
$result['subaction'] = $m[2];
if (strpos($result['action'], '_') !== FALSE) {
list($result['action'], $result['subaction']) = explode('_', $result['action'], 2);
}
return $result;
}
......
Supports Markdown
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