本文整理匯總了PHP中Operation::mark_deleted方法的典型用法代碼示例。如果您正苦於以下問題:PHP Operation::mark_deleted方法的具體用法?PHP Operation::mark_deleted怎麽用?PHP Operation::mark_deleted使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Operation
的用法示例。
在下文中一共展示了Operation::mark_deleted方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Operation
* 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/Operations/Operation.php';
$sugarbean = new Operation();
// 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']) ? 'Operations' : $_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}";
}
// now that the delete has been performed, return to given location
header("Location: {$return_location}");