projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #19321 from colemanw/profileGetFieldsFix
[civicrm-core.git]
/
CRM
/
Utils
/
Check
/
Message.php
diff --git
a/CRM/Utils/Check/Message.php
b/CRM/Utils/Check/Message.php
index 139ab43ff3dda3c9e1a68d582b185f2ac288e30a..e0a7d51d7b308c53d5b2ad7638ef50c376737b18 100644
(file)
--- a/
CRM/Utils/Check/Message.php
+++ b/
CRM/Utils/Check/Message.php
@@
-251,22
+251,20
@@
class CRM_Utils_Check_Message {
if ($this->level < 2) {
return FALSE;
}
if ($this->level < 2) {
return FALSE;
}
- $statusPreferenceParams = [
- 'name' => $this->getName(),
- 'domain_id' => CRM_Core_Config::domainID(),
- 'sequential' => 1,
+ $where = [
+ ['name', '=', $this->getName()],
+ ['domain_id', '=', CRM_Core_Config::domainID()],
];
// Check if there's a StatusPreference matching this name/domain.
];
// Check if there's a StatusPreference matching this name/domain.
- $statusPreference = civicrm_api3('StatusPreference', 'get', $statusPreferenceParams);
- $prefs = CRM_Utils_Array::value('values', $statusPreference, []);
- if ($prefs) {
+ $pref = civicrm_api4('StatusPreference', 'get', ['checkPermissions' => FALSE, 'where' => $where])->first();
+ if ($pref) {
// If so, compare severity to StatusPreference->severity.
// If so, compare severity to StatusPreference->severity.
- if ($this->level <= $pref
s[0]
['ignore_severity']) {
- if (isset($pref
s[0]
['hush_until'])) {
+ if ($this->level <= $pref['ignore_severity']) {
+ if (isset($pref['hush_until'])) {
// Time-based hush.
// Time-based hush.
- $this->hiddenUntil = $pref
s[0]
['hush_until'];
+ $this->hiddenUntil = $pref['hush_until'];
$today = new DateTime();
$today = new DateTime();
- $snoozeDate = new DateTime($pref
s[0]
['hush_until']);
+ $snoozeDate = new DateTime($pref['hush_until']);
return !($today > $snoozeDate);
}
else {
return !($today > $snoozeDate);
}
else {