com web/rmtools: implemented several new ini options regarding mailing: client/data/config/pecl/exts.ini client/include/PeclExt.php

From: Date: Thu, 26 Sep 2013 17:17:07 +0000
Subject: com web/rmtools: implemented several new ini options regarding mailing: client/data/config/pecl/exts.ini client/include/PeclExt.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-19156@lists.php.net to get a copy of this message
Commit: a3df4f16c42fb71e72ff18a554b07c09ea23f382 Author: Anatol Belski <ab@php.net> Thu, 26 Sep 2013 19:17:07 +0200 Parents: 4cd5c69cb23e9fb3ed734592e845f5313de27043 Branches: master Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=a3df4f16c42fb71e72ff18a554b07c09ea23f382 Log: implemented several new ini options regarding mailing - no_mail will disable mailing for particular ext - mailto will override any mails in package.xml Changed paths: M client/data/config/pecl/exts.ini M client/include/PeclExt.php Diff: diff --git a/client/data/config/pecl/exts.ini b/client/data/config/pecl/exts.ini index edd6724..cbc397c 100644 --- a/client/data/config/pecl/exts.ini +++ b/client/data/config/pecl/exts.ini @@ -28,6 +28,9 @@ ; opts[]= - additional configure options dependency array ; no_conf= - ignore the main config option, like --enable-myext. Useful to override it with opts[]=. ; Value is ignored, just set it. +; no_mail= - Send no alerts on extension builds +; Value is ignored, just set it. +; mailto= - Mail to send the build alerts to, that will override package.xml. ; [ssh2] diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php index dcb501a..d116ea3 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -671,10 +671,23 @@ if (!function_exists('rmtools\combinations')) { public function getToEmail() { $to = NULL; + $config = $this->getPackageConfig(); + + if ($config) { + if (isset($config['no_alerts'])) { + return NULL; + } + + if (isset($config['mailto']) && $config['mailto']) { + return $config['mailto']; + } + } + $leads = $this->getPackageXmlProperty("lead"); foreach ($leads as $lead) { if ((string)$lead->active == 'yes') { $to = (string)$lead->email; + break; } }

« previous php.webmaster (#19156) next »