Contact merge should generate a log entry
Bug #717175 reported by
Christopher Adams
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PPL |
Fix Released
|
High
|
Bassel Safadi |
Bug Description
This can be reported by contacts.php, ideally reporting the number of contacts merged.
Changed in ppl: | |
status: | New → Confirmed |
Changed in ppl: | |
milestone: | none → 0.2 |
Changed in ppl: | |
assignee: | nobody → Bassel Safadi (bassel) |
importance: | Undecided → High |
Changed in ppl: | |
status: | Confirmed → In Progress |
Changed in ppl: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
Use the following code in contacts.php to add log entries:
Variables:
$current_date = time();
$owner_id = $userid; //passed to the merge() method
If there are merges:
$log_type = '1'; //Notice
$message = "You merged your contacts." //Can this report the number of merges?
If there are no merges:
$log_type = '3'; //Alert
$message = "There are no new contacts to merge."
Here is the query:
$db- >query( "INSERT INTO ppl_logs (owner_id, log_type, created_at, message) VALUES ('$owner_id', '$log_type', FROM_UNIXTIME( $current_ date), '$message')");