grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026. -------------------------------------------------------------------------- */ /** @file * @brief * @since version 0.84 */ include ('../inc/includes.php'); if (isset($_POST['itemtype']) && isset($_POST["unlock"])) { $itemtype = $_POST['itemtype']; $source_item = new $itemtype(); if ($source_item->canCreate()) { $source_item->check($_POST['id'], UPDATE); $actions = array("Computer_Item", "Computer_SoftwareLicense", "Computer_SoftwareVersion", "ComputerDisk", "ComputerVirtualMachine", "NetworkPort", "NetworkName", "IPAddress"); $devices = Item_Devices::getDeviceTypes(); $actions = array_merge($actions, array_values($devices)); foreach ($actions as $type) { if (isset($_POST[$type]) && count($_POST[$type])) { $item = new $type(); foreach ($_POST[$type] as $key => $val) { //Force unlock $item->restore(array('id' => $key)); } } } } } //Execute hook to unlock fields managed by a plugin, if needed Plugin::doHookFunction('unlock_fields', $_POST); Html::back(); ?>