civicrm/mailing/queue - Remove hidden/obsolete sender
authorTim Otten <totten@civicrm.org>
Fri, 23 Jun 2023 18:45:12 +0000 (11:45 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 23 Jun 2023 18:45:12 +0000 (11:45 -0700)
This route was an old-school, hidden way to send a mail-blast immediately.

Now-a-days, the same use-case would be addressed by something like:

1. Go to API Explorer and run `Job.process_mailing`
2. Go to CLI and run `Job.process_mailing`

CRM/Mailing/Page/Browse.php
CRM/Mailing/xml/Menu/Mailing.xml

index 9b938b032877926332a9bdb5d4d6f00a611af9f0..c8d1344ee6970fac480b7d38ae5c456e084e3ba6 100644 (file)
@@ -116,16 +116,7 @@ class CRM_Mailing_Page_Browse extends CRM_Core_Page {
   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);
index 3c4446704fb317d7eda7d11b609c0dfaf7cc2777..34dcdaabff8bbe5586ae9241fdfaa7fc8d7957e5 100644 (file)
     <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>