Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
cb22e5dc
Commit
cb22e5dc
authored
4 years ago
by
eileen
Browse files
Options
Downloads
Patches
Plain Diff
#1749
Fix missing parameter in link to logging detail
#1749
parent
9c15aa5c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Logging/ReportSummary.php
+1
-4
1 addition, 4 deletions
CRM/Logging/ReportSummary.php
CRM/Report/Form/Contact/LoggingSummary.php
+13
-9
13 additions, 9 deletions
CRM/Report/Form/Contact/LoggingSummary.php
with
14 additions
and
13 deletions
CRM/Logging/ReportSummary.php
+
1
−
4
View file @
cb22e5dc
...
...
@@ -10,10 +10,7 @@
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
* $Id$
* Class CRM_Logging_ReportSummary
*/
class
CRM_Logging_ReportSummary
extends
CRM_Report_Form
{
protected
$cid
;
...
...
This diff is collapsed.
Click to expand it.
CRM/Report/Form/Contact/LoggingSummary.php
+
13
−
9
View file @
cb22e5dc
...
...
@@ -178,6 +178,9 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
*
* @param array $rows
* Rows generated by SQL, with an array for each row.
*
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
public
function
alterDisplay
(
&
$rows
)
{
// cache for id → is_deleted mapping
...
...
@@ -206,9 +209,9 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
$row
[
'log_civicrm_entity_altered_contact_hover'
]
=
ts
(
"Go to contact summary"
);
$entity
=
$this
->
getEntityValue
(
$row
[
'log_civicrm_entity_id'
],
$row
[
'log_civicrm_entity_log_type'
],
$row
[
'log_civicrm_entity_log_date'
]);
if
(
$entity
)
{
$row
[
'log_civicrm_entity_altered_contact'
]
=
$row
[
'log_civicrm_entity_altered_contact'
]
.
" [
{
$entity
}
]"
;
$row
[
'log_civicrm_entity_altered_contact'
]
.
=
" [
{
$entity
}
]"
;
}
if
(
$entity
==
'Contact Merged'
)
{
if
(
$entity
==
=
'Contact Merged'
)
{
// We're looking at a merge activity created against the surviving
// contact record. There should be a single activity created against
// the deleted contact record, with this activity as parent.
...
...
@@ -228,14 +231,14 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
}
$row
[
'altered_by_contact_display_name_link'
]
=
CRM_Utils_System
::
url
(
'civicrm/contact/view'
,
'reset=1&cid='
.
$row
[
'log_civicrm_entity_log_user_id'
]);
$row
[
'altered_by_contact_display_name_hover'
]
=
ts
(
"
Go to contact summary
"
);
$row
[
'altered_by_contact_display_name_hover'
]
=
ts
(
'
Go to contact summary
'
);
if
(
$row
[
'log_civicrm_entity_is_deleted'
]
and
'Update'
==
CRM_Utils_Array
::
value
(
'log_civicrm_entity_log_action'
,
$row
)
)
{
if
(
$row
[
'log_civicrm_entity_is_deleted'
]
&&
'Update'
==
=
$row
[
'log_civicrm_entity_log_action'
]
)
{
$row
[
'log_civicrm_entity_log_action'
]
=
ts
(
'Delete (to trash)'
);
}
if
(
'Contact'
==
CRM_Utils_Array
::
value
(
'log_type'
,
$this
->
_logTables
[
$row
[
'log_civicrm_entity_log_type'
]])
&&
CRM_Utils_Array
::
value
(
'log_civicrm_entity_log_action'
,
$row
)
==
ts
(
'Insert'
)
if
(
'Contact'
==
=
(
$this
->
_logTables
[
$row
[
'log_civicrm_entity_log_type'
]]
[
'log_type'
]
??
NULL
)
&&
$row
[
'log_civicrm_entity_log_action'
]
=
==
ts
(
'Insert'
)
)
{
$row
[
'log_civicrm_entity_log_action'
]
=
ts
(
'Update'
);
}
...
...
@@ -246,7 +249,7 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
if
(
$newAction
=
$this
->
getEntityAction
(
$row
[
'log_civicrm_entity_id'
],
$row
[
'log_civicrm_entity_log_conn_id'
],
$row
[
'log_civicrm_entity_log_type'
],
CRM_Utils_Array
::
value
(
'log_civicrm_entity_log_action'
,
$row
))
(
$row
[
'log_civicrm_entity_log_action'
]
??
NULL
))
)
{
$row
[
'log_civicrm_entity_log_action'
]
=
$newAction
;
}
...
...
@@ -255,7 +258,7 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
$date
=
CRM_Utils_Date
::
isoToMysql
(
$row
[
'log_civicrm_entity_log_date'
]);
if
(
in_array
(
CRM_Utils_Array
::
value
(
'log_civicrm_entity_log_action'
,
$row
),
[
'Update'
,
'Delete'
]))
{
if
(
in_array
(
(
$row
[
'log_civicrm_entity_log_action'
]
??
NULL
),
[
'Update'
,
'Delete'
]))
{
$row
=
$this
->
addDetailReportLinksToRow
(
$baseQueryCriteria
,
$row
);
}
...
...
@@ -293,7 +296,7 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
$entity
=
$this
->
currentLogTable
;
$detail
=
$this
->
_logTables
[
$entity
];
$tableName
=
CRM_Utils_Array
::
value
(
'table_name'
,
$detail
,
$entity
)
;
$tableName
=
$detail
[
'table_name'
]
??
$entity
;
$clause
=
$detail
[
'entity_table'
]
??
NULL
;
$clause
=
$clause
?
"AND entity_log_civireport.entity_table = 'civicrm_contact'"
:
NULL
;
...
...
@@ -333,6 +336,7 @@ LEFT JOIN civicrm_contact altered_by_contact_civireport
protected
function
addDetailReportLinksToRow
(
$baseQueryCriteria
,
$row
)
{
$q
=
$baseQueryCriteria
;
$q
.
=
(
!
empty
(
$row
[
'log_civicrm_entity_altered_contact'
]))
?
'&alteredName='
.
$row
[
'log_civicrm_entity_altered_contact'
]
:
''
;
$q
.
=
(
!
empty
(
$row
[
'log_civicrm_entity_altered_contact_id'
]))
?
'&cid='
.
$row
[
'log_civicrm_entity_altered_contact_id'
]
:
''
;
$q
.
=
(
!
empty
(
$row
[
'altered_by_contact_display_name'
]))
?
'&alteredBy='
.
$row
[
'altered_by_contact_display_name'
]
:
''
;
$q
.
=
(
!
empty
(
$row
[
'log_civicrm_entity_log_user_id'
]))
?
'&alteredById='
.
$row
[
'log_civicrm_entity_log_user_id'
]
:
''
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment