forked from extern/egroupware
extended historylog::delete to delete all entries of an app, to be used by setup
This commit is contained in:
parent
eb002e91c3
commit
63d7cc09a3
@ -36,7 +36,7 @@
|
||||
);
|
||||
var $alternate_handlers = array();
|
||||
|
||||
function historylog($appname)
|
||||
function historylog($appname='')
|
||||
{
|
||||
if (! $appname)
|
||||
{
|
||||
@ -49,8 +49,13 @@
|
||||
|
||||
function delete($record_id)
|
||||
{
|
||||
$this->db->query("delete from phpgw_history_log where history_record_id='".intval($record_id)."' and "
|
||||
. "history_appname='" . $this->appname . "'",__LINE__,__FILE__);
|
||||
$appname = intval($record_id) ? $this->appname : $record_id;
|
||||
$record_id = intval($record_id);
|
||||
$this->db->query('DELETE FROM phpgw_history_log WHERE'.
|
||||
($record_id ? " history_record_id='$record_id' AND" : '').
|
||||
" history_appname='$appname'",__LINE__,__FILE__);
|
||||
|
||||
return $this->db->affected_rows();
|
||||
}
|
||||
|
||||
function add($status,$record_id,$new_value,$old_value)
|
||||
|
Loading…
Reference in New Issue
Block a user