function generateAutoPorts() { $object = spotEntity('object', getBypassValue()); executeAutoPorts($object['id'], $object['objtype_id']); showFuncMessage(__FUNCTION__, 'OK'); return buildRedirectURL(NULL, 'ports'); }
function commitAddObject($new_name, $new_label, $new_type_id, $new_asset_no, $taglist = array()) { checkObjectNameUniqueness($new_name); usePreparedInsertBlade('Object', array('name' => !strlen($new_name) ? NULL : $new_name, 'label' => !strlen($new_label) ? NULL : $new_label, 'objtype_id' => $new_type_id, 'asset_no' => !strlen($new_asset_no) ? NULL : $new_asset_no)); $object_id = lastInsertID(); // Do AutoPorts magic executeAutoPorts($object_id, $new_type_id); // Now tags... produceTagsForNewRecord('object', $taglist, $object_id); recordObjectHistory($object_id); return $object_id; }