// Ensure that $formfields is an array if (!is_array($formfields) && isset($formfields)) { $formfields = array($formfields); } // Ensure that $formfield_types is an array if (!is_array($formfield_types) && isset($formfield_types)) { $formfield_types = array($formfield_types); } // Ensure that $formfield_indexes is an array if (!is_array($formfield_indexes) && isset($formfield_indexes)) { $formfield_indexes = array($formfield_indexes); } $name = $this->params['name']; $code = $this->params['code']; // Set the new name if ($entrymaskMgr->setInfo($objectID, $name, $code) === false) { $koala->callJSFunction('Koala.yg_error', 'entrymask', $objectID . '-entrymask', 'code'); $haderror = true; } else { $jsQueue->add($objectID, HISTORYTYPE_ENTRYMASK, 'UNHIGHLIGHT_ENTRYMASK', sGuiUS(), 'code'); $jsQueue->add($objectID, HISTORYTYPE_ENTRYMASK, 'OBJECT_CHANGE', sGuiUS(), 'entrymask', NULL, NULL, $objectID . '-entrymask', 'name', $name); } if (!$haderror) { // Check which formfields to delete $old_formfields = $entrymaskMgr->getEntrymaskFormfields($objectID); $to_del = array(); foreach ($old_formfields as $old_formfield) { $del = true; foreach ($formfields as $formfield) { if ($formfield == $old_formfield['ID']) { $del = false;