[git] commit karma.git: hooks/post-receive.mail
| From: | David Soria Parra | Date: | Mon, 19 Mar 2012 15:28:37 +0000 |
| Subject: | [git] commit karma.git: hooks/post-receive.mail | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-67950@lists.php.net to get a copy of this message | ||
Commit: dbda495a2985d4447f629bf50adbae16ee518dc3
Author: David Soria Parra(dsp@php.net) Mon, 19 Mar 2012 16:17:23 +0100
Committer: David Soria Parra(dsp@php.net) Mon, 19 Mar 2012 16:17:23 +0100
Parents: efd58e9da03931adc336fbf3400a94d4103f5fbf
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=dbda495a2985d4447f629bf50adbae16ee518dc3
Log:
Do not send mails when we have no receipients
Changed paths:
M hooks/post-receive.mail
Diff:
dbda495a2985d4447f629bf50adbae16ee518dc3
diff --git a/hooks/post-receive.mail b/hooks/post-receive.mail
index 8814b35..7d47619 100755
--- a/hooks/post-receive.mail
+++ b/hooks/post-receive.mail
@@ -40,11 +40,13 @@ if (getenv('REMOTE_USER')) {
$user = getenv('GL_USER');
}
-$hook = new \Git\PostReceiveHook(
- getenv('GL_REPO_BASE_ABS') ?: REPOSITORY_PATH,
- $user,
- getenv('USERS_DB_FILE') ?: USERS_DB_FILE,
- $recipients,
- $emailPrefix
-);
-$hook->process();
\ No newline at end of file
+if (!empty($recipients)) {
+ $hook = new \Git\PostReceiveHook(
+ getenv('GL_REPO_BASE_ABS') ?: REPOSITORY_PATH,
+ $user,
+ getenv('USERS_DB_FILE') ?: USERS_DB_FILE,
+ $recipients,
+ $emailPrefix
+ );
+ $hook->process();
+}