Skip to content

Commit

Permalink
Merge pull request #26626 from totten/master-mail-cleanup
Browse files Browse the repository at this point in the history
CiviMail - Sundry cleanups
  • Loading branch information
seamuslee001 authored Jun 23, 2023
2 parents 2ad8b9b + b760be1 commit 42aa04d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
15 changes: 3 additions & 12 deletions CRM/Mailing/Page/Browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,13 @@ public function preProcess() {
public function run() {
$this->preProcess();

$newArgs = func_get_args();
// since we want only first function argument
$newArgs = $newArgs[0];
$this->_isArchived = $this->isArchived($newArgs);
if (isset($_GET['runJobs']) || CRM_Utils_Array::value('2', $newArgs) == 'queue') {
$mailerJobSize = Civi::settings()->get('mailerJobSize');
CRM_Mailing_BAO_MailingJob::runJobs_pre($mailerJobSize);
CRM_Mailing_BAO_MailingJob::runJobs();
CRM_Mailing_BAO_MailingJob::runJobs_post();
}
$newArgs = func_get_args()[0];

$this->_sortByCharacter
= CRM_Utils_Request::retrieve('sortByCharacter', 'String', $this);

// CRM-11920 all should set sortByCharacter to null, not empty string
if (strtolower($this->_sortByCharacter) == 'all' || !empty($_POST)) {
// CRM-11920 "all" should set sortByCharacter to null, not empty string
if (strtolower($this->_sortByCharacter ?: '') == 'all' || !empty($_POST)) {
$this->_sortByCharacter = NULL;
$this->set('sortByCharacter', NULL);
}
Expand Down
7 changes: 0 additions & 7 deletions CRM/Mailing/xml/Menu/Mailing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,6 @@
<is_public>true</is_public>
<weight>685</weight>
</item>
<item>
<path>civicrm/mailing/queue</path>
<title>Sending Mail</title>
<page_callback>CRM_Mailing_Page_Browse</page_callback>
<access_arguments>access CiviMail</access_arguments>
<weight>690</weight>
</item>
<item>
<path>civicrm/mailing/report/event</path>
<title>Mailing Event</title>
Expand Down
11 changes: 2 additions & 9 deletions ext/flexmailer/src/Listener/Abdicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,8 @@ class Abdicator {
* @return bool
*/
public static function isFlexmailPreferred($mailing) {
if ($mailing->sms_provider_id) {
return FALSE;
}

// Use FlexMailer for new-style email blasts (with custom `template_type`).
if ($mailing->template_type && $mailing->template_type !== 'traditional') {
return TRUE;
}
return TRUE;
// Yes for CiviMail - no for CiviSMS
return empty($mailing->sms_provider_id);
}

/**
Expand Down

0 comments on commit 42aa04d

Please sign in to comment.