Commit e449a169 authored by bgm's avatar bgm

Merge branch 'extEmail' into 'master'

Improve message subject of release emails

See merge request marketing/civicrm-website!3
parents c7ec7578 e2b2bf69
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2013
* $Id$
* @copyright CiviCRM LLC (c) 2004-2018
*
*/
/**
* @file
* Example drush command.
*
* Shows how to make your own drush command.
*
* You can copy this file to any of the following
* 1. A .drush folder in your HOME folder.
* 2. Anywhere in a folder tree below an active module on your site.
* 3. In an arbitrary folder specified with the --include option.
*/
/**
* Implementation of hook_drush_command().
*
......@@ -144,8 +106,15 @@ function drush_extdir_scan($pattern = NULL) {
$body = _extdir_compose_email($tag, $extension, $errorMessages);
printf("Send email (%s)\n", implode($maintainers, ', '));
_extdir_debug(array('email-body' => $body));
if (! drush_get_option('test')) {
_extdir_send_email(implode($maintainers, ', '), t('Your extension release on civicrm.org'), $body);
if (!drush_get_option('test')) {
$extKey = $extension->field_extension_fq_name[LANGUAGE_NONE][0]['value'];
if ($errorMessages) {
$subject = "Error while processing release $version of $extKey";
}
else {
$subject = "Successfully released version $version of $extKey";
}
_extdir_send_email(implode($maintainers, ', '), $subject, $body);
}
} // end if version not in existing releases
} // end foreach git tag
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment