if ($PluginRacksRack->canCreate()) { foreach ($_POST["updateDevice"] as $key => $val) { $vartype = "type" . $key; $varspec = "plugin_racks_itemspecifications_id" . $key; $varname = "name" . $key; $varitems_id = "items_id" . $key; if ($_POST[$vartype] == 'PluginRacksOtherModel') { $PluginRacksOther->updateOthers($_POST[$varitems_id], $_POST[$varname]); } $varpos = "position" . $key; $space_left = $PluginRacksRack_Item->updateItem($key, $_POST[$vartype], $_POST[$varspec], $_POST['plugin_racks_racks_id'], $_POST['rack_size'], $_POST['faces_id'], $_POST[$varitems_id], $_POST[$varpos]); } } if ($space_left < 0) { Session::addMessageAfterRedirect(__('No more place for insertion', 'racks'), false, ERROR); } Html::back(); } else { $PluginRacksRack->checkGlobal("r"); Html::header(PluginRacksRack::getTypeName(2), '', "plugins", "racks"); $PluginRacksRack->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"])); Html::footer(); } } } } } } } } }