mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
Make log_caldav_action log calendar_item summary
This commit is contained in:
parent
bc7fd66b5f
commit
c04f818c4c
@ -25,7 +25,14 @@
|
||||
*/
|
||||
function log_caldav_action( $action_type, $uid, $user_no, $collection_id, $dav_name ) {
|
||||
|
||||
$logline = sprintf( '%s, %s, %s, %s, %s', $action_type, $uid, $user_no, $collection_id, $dav_name );
|
||||
$summary = '';
|
||||
if ($uid === NULL) { $uid = basename($dav_name, '.ics'); } // in case of DELETE
|
||||
|
||||
$sql = 'SELECT summary FROM calendar_item WHERE uid=?';
|
||||
$qry = new AwlQuery($sql, $uid);
|
||||
if($qry->Exec('log_caldav_action', __LINE__, __FILE__) && $qry->rows() > 0 && $row = $qry->Fetch()) { $summary = $row->summary; }
|
||||
|
||||
$logline = sprintf( '%s, %s, %s, %s, %s, %s', $action_type, $uid, $user_no, $collection_id, $dav_name, $summary );
|
||||
|
||||
openlog('davical', LOG_PID, LOG_LOCAL0);
|
||||
syslog(LOG_INFO, $logline);
|
||||
@ -34,7 +41,14 @@ function log_caldav_action( $action_type, $uid, $user_no, $collection_id, $dav_n
|
||||
}
|
||||
function post_commit_action( $action_type, $uid, $user_no, $collection_id, $dav_name ) {
|
||||
|
||||
$logline = sprintf( '%s, %s, %s, %s, %s', $action_type, $uid, $user_no, $collection_id, $dav_name );
|
||||
$summary = '';
|
||||
if ($uid === NULL) { $uid = basename($dav_name, '.ics'); } // in case of DELETE
|
||||
|
||||
$sql = 'SELECT summary FROM calendar_item WHERE uid=?';
|
||||
$qry = new AwlQuery($sql, $uid);
|
||||
if($qry->Exec('log_caldav_action', __LINE__, __FILE__) && $qry->rows() > 0 && $row = $qry->Fetch()) { $summary = $row->summary; }
|
||||
|
||||
$logline = sprintf( '%s, %s, %s, %s, %s, %s', $action_type, $uid, $user_no, $collection_id, $dav_name, $summary );
|
||||
|
||||
openlog('davical', LOG_PID, LOG_LOCAL0);
|
||||
syslog(LOG_INFO, $logline);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user