diff --git a/Civi/Mailinglistsync/BaseMailingList.php b/Civi/Mailinglistsync/BaseMailingList.php index a5b3a15..c928635 100644 --- a/Civi/Mailinglistsync/BaseMailingList.php +++ b/Civi/Mailinglistsync/BaseMailingList.php @@ -95,7 +95,7 @@ abstract class BaseMailingList */ static protected function getCustomFields(): array { - return CustomField::get(FALSE) + return CustomField::get() ->addSelect('*') ->addWhere('custom_group_id:name', '=', static::CUSTOM_GROUP_NAME) ->execute() diff --git a/Civi/Mailinglistsync/QueueHelper.php b/Civi/Mailinglistsync/QueueHelper.php index 036ee2a..3988dbc 100644 --- a/Civi/Mailinglistsync/QueueHelper.php +++ b/Civi/Mailinglistsync/QueueHelper.php @@ -29,21 +29,21 @@ class QueueHelper { 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $this->eventQueue = \Civi::queue( 'propeace-mailinglist-event-queue', [ 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $this->emailQueue = \Civi::queue( 'propeace-mailinglist-email-queue', [ 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $this->groups = []; @@ -106,14 +106,12 @@ class QueueHelper { * Stores an email address in the queue helper singleton. * * @param \CRM_Queue_TaskContext $context - * @param string|null $email + * @param string $email * * @return bool */ - public static function storeEmail(\CRM_Queue_TaskContext $context, ?string $email): bool { - if (!empty($email)) { - self::getInstance()->addToEmails($email); - } + public static function storeEmail(\CRM_Queue_TaskContext $context, string $email): bool { + self::getInstance()->addToEmails($email); return TRUE; } diff --git a/LICENSE.txt b/LICENSE.txt index d72e56f..41c2284 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ Package: de.propeace.mailinglistsync -Copyright (C) 2025, Pro Peace +Copyright (C) 2025, FIXME Licensed under the GNU Affero Public License 3.0 (below). ------------------------------------------------------------------------------- diff --git a/info.xml b/info.xml index e90cf7f..41e1e8b 100644 --- a/info.xml +++ b/info.xml @@ -7,12 +7,12 @@ Marc Koch - marc.koch@propeace.de + koch@forumZFD.de Maintainer - https://git.propeace.de/ProPeace/de.propeace.mailinglistsync--> + https://www.gnu.org/licenses/agpl-3.0.html diff --git a/mailinglistsync.php b/mailinglistsync.php index 4307197..9f76eb8 100644 --- a/mailinglistsync.php +++ b/mailinglistsync.php @@ -129,7 +129,7 @@ function mailinglistsync_civicrm_validateForm($formName, &$fields, &$files, &$fo 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback @@ -145,7 +145,7 @@ function mailinglistsync_civicrm_validateForm($formName, &$fields, &$files, &$fo 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback @@ -326,7 +326,7 @@ function mailinglistsync_civicrm_postCommit(string $op, string $objectName, int 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback @@ -347,7 +347,7 @@ function mailinglistsync_civicrm_postCommit(string $op, string $objectName, int 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback @@ -374,7 +374,7 @@ function mailinglistsync_civicrm_postCommit(string $op, string $objectName, int 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback @@ -395,7 +395,7 @@ function mailinglistsync_civicrm_postCommit(string $op, string $objectName, int 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback @@ -416,7 +416,7 @@ function mailinglistsync_civicrm_postCommit(string $op, string $objectName, int 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback @@ -451,7 +451,7 @@ function mailinglistsync_civicrm_postCommit(string $op, string $objectName, int 'type' => 'SqlParallel', 'is_autorun' => FALSE, 'reset' => FALSE, - 'error' => 'abort', + 'error' => 'drop', ]); $queue->createItem(new CRM_Queue_Task( // callback