Ejemplo n.º 1
0
 * The Original Code is:  SugarCRM Open Source
 * The Initial Developer of the Original Code is SugarCRM, Inc.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 ********************************************************************************/
/*********************************************************************************
 * $Header: /advent/projects/wesat/ec_crm/sugarcrm/modules/Notes/Delete.php,v 1.6 2005/03/10 09:30:13 shaw Exp $
 * Description:  TODO: To be written.
 ********************************************************************************/
require_once 'modules/Notes/Notes.php';
require_once 'include/logging.php';
$log = LoggerManager::getLogger('note_delete');
$focus = new Notes();
if (!isset($_REQUEST['record'])) {
    die("A record number must be specified to delete the note.");
}
//DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$_REQUEST['record'],$_REQUEST['return_id']);
$focus->mark_deleted($_REQUEST['record']);
if (isset($_REQUEST['parenttab']) && $_REQUEST['parenttab'] != "") {
    $parenttab = $_REQUEST['parenttab'];
}
//added by ligangze 2013-08-07
$moduletype = "relmodule";
if ($_REQUEST['return_action'] == "CallRelatedList") {
    $return_action = "RelateLists";
    $moduletype = "moduletype";
} else {
    $return_action = $_REQUEST['return_action'];
}
header("Location: index.php?module=" . $_REQUEST['return_module'] . "&action=" . $return_action . "&record=" . $_REQUEST['return_id'] . "&parenttab={$parenttab}" . "&{$moduletype}=" . $_REQUEST['module']);