} 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}"); }
* * The Original Code is: SugarCRM Open Source * The Initial Developer of the Original Code is SugarCRM, Inc. * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.; * All Rights Reserved. * Contributor(s): ______________________________________. */ require_once 'modules/ProductComponents/ProductComponents.php'; $sugarbean = new ProductComponents(); // perform the delete if given a record to delete if (empty($_REQUEST['record'])) { $GLOBALS['log']->info('delete called without a record id specified'); } else { $record = $_REQUEST['record']; $sugarbean->retrieve($record); if (!$sugarbean->ACLAccess('Delete')) { ACLController::displayNoAccess(true); sugar_cleanup(true); } $GLOBALS['log']->info("deleting record: {$record}"); $sugarbean->mark_deleted($record); } // handle the return location variables $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']) ? '' : $_REQUEST['return_id']; $return_location = "index.php?module={$return_module}&action={$return_action}"; // append the return_id if given if (!empty($return_id)) { $return_location .= "&record={$return_id}"; }