forked from extern/egroupware
Infolog - add ability to clear description history
This commit is contained in:
@ -85,6 +85,27 @@ class History
|
||||
return $this->db->affected_rows();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete history log of a certain field
|
||||
* @param string $record_id ID of the record
|
||||
* @param string $status Field name / ID
|
||||
*/
|
||||
function delete_field($record_id, $status)
|
||||
{
|
||||
$where = array(
|
||||
'history_appname' => $this->appname,
|
||||
'history_status' => $status
|
||||
);
|
||||
|
||||
if (is_array($record_id) || is_numeric($record_id))
|
||||
{
|
||||
$where['history_record_id'] = $record_id;
|
||||
}
|
||||
$this->db->delete(self::TABLE,$where,__LINE__,__FILE__);
|
||||
|
||||
return $this->db->affected_rows();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a history record, if $new_value != $old_value
|
||||
*
|
||||
|
Reference in New Issue
Block a user