Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
extensions
Call Next Dashlet
Commits
ffbd2b35
Commit
ffbd2b35
authored
Apr 15, 2021
by
Christian Wach
⚽
Browse files
Prevent undefined variable warnings
parent
551680bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
CRM/CallNextDashlet/Page/CallNextDashlet.php
View file @
ffbd2b35
...
...
@@ -159,7 +159,6 @@ class CRM_CallNextDashlet_Page_CallNextDashlet extends CRM_Core_Page {
// Do something if API call fails.
error_log
(
print_r
([
'method'
=>
__METHOD__
,
'activities_me'
=>
$activities_me
,
'message'
=>
$e
->
getMessage
(),
],
TRUE
));
...
...
@@ -187,7 +186,6 @@ class CRM_CallNextDashlet_Page_CallNextDashlet extends CRM_Core_Page {
// Do something if API call fails.
error_log
(
print_r
([
'method'
=>
__METHOD__
,
'activities_none'
=>
$activities_none
,
'message'
=>
$e
->
getMessage
(),
],
TRUE
));
...
...
@@ -198,15 +196,19 @@ class CRM_CallNextDashlet_Page_CallNextDashlet extends CRM_Core_Page {
// Merge the arrays.
$activities
=
[];
foreach
(
$activities_me
[
'values'
]
as
$activity
)
{
$activities
[]
=
$activity
;
if
(
!
empty
(
$activities_me
[
'values'
]))
{
foreach
(
$activities_me
[
'values'
]
as
$activity
)
{
$activities
[]
=
$activity
;
}
}
foreach
(
$activities_none
[
'values'
]
as
$activity
)
{
if
(
empty
(
$activity
[
'assignee_contact_id'
]))
{
foreach
(
$activity
[
'target_contact_id'
]
as
$contactID
)
{
if
(
self
::
can_view_contact
(
$contactID
))
{
$activities
[]
=
$activity
;
break
;
if
(
!
empty
(
$activities_none
[
'values'
]))
{
foreach
(
$activities_none
[
'values'
]
as
$activity
)
{
if
(
empty
(
$activity
[
'assignee_contact_id'
]))
{
foreach
(
$activity
[
'target_contact_id'
]
as
$contactID
)
{
if
(
self
::
can_view_contact
(
$contactID
))
{
$activities
[]
=
$activity
;
break
;
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment