Skip to content
Snippets Groups Projects
Commit ddd2c882 authored by Chris Gross's avatar Chris Gross
Browse files

7.x-1.11 Release Candidate 3

parent aa235f69
No related branches found
Tags 7.x-1.11-rc3
No related merge requests found
WCM Base 7.x-1.11-rc3, 2019-02-04
---------------------------------
- WCM Base: Patched SMTP module to fix errors on webforms with multiple recipients.
- WCM News Client: Updated metatag settings to be enabled by default.
WCM Base 7.x-1.11-rc2, 2019-01-24
---------------------------------
- WCM Base: Updated Panopoly to 1.60 per SA-CONTRIB-2019-004.
......
The following patches have been applied to this project:
- https://www.drupal.org/files/issues/2018-11-13/smtp-filepath_uri-2966816-27-D7_0.patch
- https://www.drupal.org/files/issues/2018-06-04/2753115-41-smtp-multiple-to-addresses-error.patch
This file was automatically generated by Drush Make (http://drupal.org/project/drush).
......@@ -765,6 +765,7 @@ class SmtpMailSystem implements MailSystemInterface {
* An array containing a name and an email address.
*/
protected function _get_components($input) {
$input = trim($input);
$components = array(
'input' => $input,
'name' => '',
......@@ -774,7 +775,7 @@ class SmtpMailSystem implements MailSystemInterface {
// If the input is a valid email address in its entirety, then there is
// nothing to do, just return that.
if (valid_email_address($input)) {
$components['email'] = trim($input);
$components['email'] = $input;
return $components;
}
......
......@@ -165,6 +165,50 @@ class SmtpUnitTest extends DrupalWebTestCase {
$this->assertEqual($queue_count, 0, 'An email was not found in the failure queue.');
}
/**
* Tests email address parsing.
*/
public function testAddressParsing() {
$mail_sytem = new class() extends SmtpMailSystem {
/**
* Exposes the protected _get_components method, returning an array of name and email address from a string.
*
* @param $input
* A string that contains different possible combinations of names and
* email address.
* @return
* An array containing a name and an email address.
*/
public function getComponents($input) {
return $this->_get_components($input);
}
};
$valid_addresses = array(
'to_test@example.com',
'to_test@example.com,to_test2@example.com',
'to_test@example.com, to_test2@example.com',
);
foreach ($valid_addresses as $address) {
$recipients = explode(',', $address);
foreach ($recipients as $recipient) {
// We create a new PHPMailer instance for each recipient so errors can be cleared out.
$mailer = new PHPMailer();
$components = $mail_sytem->getComponents($recipient);
$this->assertTrue(strlen($components['email']) > 0, format_string('Parsing address "%address" resulted in a non-zero length value', array(
'%address' => $components['email'],
)));
$mailer->AddAddress($components['email'], $components['name']);
$this->assertFalse($mailer->IsError(), format_string('PHPMailer has no errors for address "%address"', array(
'%address' => $components['email'],
)));
}
}
}
/**
* Gets the latest Maillog entry.
*
......
<?php
/**
* @file news_client.metatag.inc
* Defines metatag defaults for news_client.
*/
/**
* Implements hook_metatag_config_default().
*/
function news_client_metatag_config_default() {
$configs = array();
$config = new stdClass();
$config->disabled = FALSE; /* Edit this to true to make a default config disabled initially */
$config->api_version = 1;
$config->instance = 'node:news_client_cached_article';
$config->config = array(
'description' => array(
'value' => '[node:news_client_body_summary]',
),
'image_src' => array(
'value' => '[node:news_client_social_image_url]',
),
'og:description' => array(
'value' => '[node:news_client_body_summary]',
),
'og:image' => array(
'value' => '[node:news_client_social_image_url]',
),
'twitter:card' => array(
'value' => 'summary_large_image',
),
'twitter:description' => array(
'value' => '[node:news_client_body_summary]',
),
'twitter:image' => array(
'value' => '[node:news_client_social_image_url]',
),
'twitter:image:alt' => array(
'value' => '[node:news_client_social_image_alt]',
),
);
$configs[$config->instance] = $config;
return $configs;
}
......@@ -25,6 +25,15 @@ function news_client_views_api() {
);
}
/**
* Implements hook_ctools_plugin_api().
*/
function news_client_ctools_plugin_api($owner, $api) {
if ($owner == 'metatag' && $api == 'metatag') {
return array('version' => 1);
}
}
/**
* Implements hook_views_data().
*/
......
......@@ -157,6 +157,7 @@ projects[smart_trim][subdir] = contrib
projects[smtp][version] = 1.7
projects[smtp][subdir] = contrib
projects[smtp][patch][2966816] = https://www.drupal.org/files/issues/2018-11-13/smtp-filepath_uri-2966816-27-D7_0.patch
projects[smtp][patch][2753115] = https://www.drupal.org/files/issues/2018-06-04/2753115-41-smtp-multiple-to-addresses-error.patch
projects[special_menu_items][version] = 2.0
projects[special_menu_items][subdir] = contrib
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment