Commit a952b242 authored by Johan Cwiklinski's avatar Johan Cwiklinski Committed by Johan Cwiklinski
Browse files

Fix missing table

parent 3dc389e9
...@@ -93,7 +93,12 @@ if (isset($_POST["itemtype"]) ...@@ -93,7 +93,12 @@ if (isset($_POST["itemtype"])
exit(); exit();
} }
$table = getTableForItemType($_POST['itemtype']); $itemtype = $_POST['itemtype'];
if (is_subclass_of($itemtype, 'Rule')) {
$table = Rule::getTable();
} else {
$table = getTableForItemType($_POST['itemtype']);
}
$tmpname = Dropdown::getDropdownName($table, $_POST["value"], 1); $tmpname = Dropdown::getDropdownName($table, $_POST["value"], 1);
if (is_array($tmpname) && isset($tmpname["comment"])) { if (is_array($tmpname) && isset($tmpname["comment"])) {
echo $tmpname["comment"]; echo $tmpname["comment"];
......
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