} if (!empty($_REQUEST['date_due']) && !empty($_REQUEST['time_due'])) { $time_due_meridiem = ""; if (isset($_REQUEST['time_due_meridiem'])) { $time_due_meridiem = $_REQUEST['time_due_meridiem']; } $product->date_due = $_REQUEST['date_due']; $product->time_due = $_REQUEST['time_due'] . $time_due_meridiem; } // lets SugarBean handle date processing $product->process_save_dates = true; $GLOBALS['check_notify'] = false; if (!empty($_POST['assigned_user_id']) && $focus->assigned_user_id != $_POST['assigned_user_id'] && $_POST['assigned_user_id'] != $current_user->id) { $GLOBALS['check_notify'] = true; } if (!$product->ACLAccess('Save')) { ACLController::displayNoAccess(true); sugar_cleanup(true); } $product->save($GLOBALS['check_notify']); if (isset($_REQUEST['form'])) { // we are doing the save from a popup window echo '<script>opener.window.location.reload();self.close();</script>'; die; } else { // need to refresh the page properly $return_module = empty($_REQUEST['return_module']) ? 'ProductComponents' : $_REQUEST['return_module']; $return_action = empty($_REQUEST['return_action']) ? 'index' : $_REQUEST['return_action']; $return_id = empty($_REQUEST['return_id']) ? $product->id : $_REQUEST['return_id']; header("Location: index.php?module={$return_module}&action={$return_action}&record={$return_id}"); }