Commit: dbda495a2985d4447f629bf50adbae16ee518dc3 Author: David Soria Parra(d...@php.net) Mon, 19 Mar 2012 16:17:23 +0100 Committer: David Soria Parra(d...@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(); +} -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php