Not upgrade safe but you could alter the query if you'd like in data/SugarBean.php:
PHP Code:
function mark_deleted($id)
{
$date_modified = gmdate('Y-m-d H:i:s');
if(isset($_SESSION['show_deleted']))
{
$this->mark_undeleted($id);
}
else
{
// call the custom business logic
$custom_logic_arguments['id'] = $id;
$this->call_custom_logic("before_delete", $custom_logic_arguments);
global $current_user;
$query = "UPDATE $this->table_name set deleted=1 , date_modified = '$date_modified', modified_user_id = '$current_user->id'' where id='$id'";
$this->db->query($query, true,"Error marking record deleted: ");
$this->mark_relationships_deleted($id);
// Take the item off the recently viewed lists
$tracker = new Tracker();
$tracker->makeInvisibleForAll($id);
// call the custom business logic
$this->call_custom_logic("after_delete", $custom_logic_arguments);
}
}
Bookmarks