Compare commits
5 commits
1.0.0-beta
...
main
Author | SHA1 | Date | |
---|---|---|---|
2d7fae39ce | |||
361c2ba00f | |||
927029c1fd | |||
60dd218688 | |||
aa8d25d5ed |
5 changed files with 20 additions and 18 deletions
|
@ -95,7 +95,7 @@ abstract class BaseMailingList
|
|||
*/
|
||||
static protected function getCustomFields(): array
|
||||
{
|
||||
return CustomField::get()
|
||||
return CustomField::get(FALSE)
|
||||
->addSelect('*')
|
||||
->addWhere('custom_group_id:name', '=', static::CUSTOM_GROUP_NAME)
|
||||
->execute()
|
||||
|
|
|
@ -29,21 +29,21 @@ class QueueHelper {
|
|||
'type' => 'SqlParallel',
|
||||
'is_autorun' => FALSE,
|
||||
'reset' => FALSE,
|
||||
'error' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$this->eventQueue = \Civi::queue(
|
||||
'propeace-mailinglist-event-queue', [
|
||||
'type' => 'SqlParallel',
|
||||
'is_autorun' => FALSE,
|
||||
'reset' => FALSE,
|
||||
'error' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$this->emailQueue = \Civi::queue(
|
||||
'propeace-mailinglist-email-queue', [
|
||||
'type' => 'SqlParallel',
|
||||
'is_autorun' => FALSE,
|
||||
'reset' => FALSE,
|
||||
'error' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
|
||||
$this->groups = [];
|
||||
|
@ -106,12 +106,14 @@ class QueueHelper {
|
|||
* Stores an email address in the queue helper singleton.
|
||||
*
|
||||
* @param \CRM_Queue_TaskContext $context
|
||||
* @param string $email
|
||||
* @param string|null $email
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function storeEmail(\CRM_Queue_TaskContext $context, string $email): bool {
|
||||
public static function storeEmail(\CRM_Queue_TaskContext $context, ?string $email): bool {
|
||||
if (!empty($email)) {
|
||||
self::getInstance()->addToEmails($email);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: de.propeace.mailinglistsync
|
||||
Copyright (C) 2025, FIXME <FIXME>
|
||||
Copyright (C) 2025, Pro Peace <info@propeace.de>
|
||||
Licensed under the GNU Affero Public License 3.0 (below).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
4
info.xml
4
info.xml
|
@ -7,12 +7,12 @@
|
|||
<authors>
|
||||
<author>
|
||||
<name>Marc Koch</name>
|
||||
<email>koch@forumZFD.de</email>
|
||||
<email>marc.koch@propeace.de</email>
|
||||
<role>Maintainer</role>
|
||||
</author>
|
||||
</authors>
|
||||
<urls>
|
||||
<!-- <url desc="Main Extension Page">https://FIXME</url>-->
|
||||
<url desc="Main Extension Page">https://git.propeace.de/ProPeace/de.propeace.mailinglistsync</url>-->
|
||||
<!-- <url desc="Documentation">https://FIXME</url>-->
|
||||
<!-- <url desc="Support">https://FIXME</url>-->
|
||||
<url desc="Licensing">https://www.gnu.org/licenses/agpl-3.0.html</url>
|
||||
|
|
|
@ -129,7 +129,7 @@ function mailinglistsync_civicrm_validateForm($formName, &$fields, &$files, &$fo
|
|||
'type' => 'SqlParallel',
|
||||
'is_autorun' => FALSE,
|
||||
'reset' => FALSE,
|
||||
'error' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$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' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$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' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$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' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$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' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$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' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$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' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$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' => 'drop',
|
||||
'error' => 'abort',
|
||||
]);
|
||||
$queue->createItem(new CRM_Queue_Task(
|
||||
// callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue