cvs: SVNROOT / commit-email.php
| From: | Gwynne Raskind | Date: | Sat, 20 Dec 2008 00:28:43 +0000 |
| Subject: | cvs: SVNROOT / commit-email.php | ||
| Groups: | svn.migration | ||
| Request: | Send a blank email to svn-migration+get-208@lists.php.net to get a copy of this message | ||
gwynne Sat Dec 20 00:28:43 2008 UTC
Modified files:
/SVNROOT commit-email.php
Log:
trim() the user line, don't need a shebang in this script, discard response from the SMTP
server
http://cvs.php.net/viewvc.cgi/SVNROOT/commit-email.php?r1=1.5&r2=1.6&diff_format=u
Index: SVNROOT/commit-email.php
diff -u SVNROOT/commit-email.php:1.5 SVNROOT/commit-email.php:1.6
--- SVNROOT/commit-email.php:1.5 Fri Dec 19 20:42:38 2008
+++ SVNROOT/commit-email.php Sat Dec 20 00:28:43 2008
@@ -1,4 +1,3 @@
-#!/usr/local/bin/php
<?php
// Note that this script is intended to be called from inside the post-commit
@@ -8,7 +7,7 @@
//
-----------------------------------------------------------------------------------------------------------------------------
// Constants
-$version = substr('$Revision: 1.5 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.6 $', strlen('$Revision: '), -2);
$smtp_server = '127.0.0.1';
$commit_email_list = array(
// FastCGI ISAPI
@@ -99,7 +98,7 @@
//
-----------------------------------------------------------------------------------------------------------------------------
// Get info from commit
$commit_info = run_svnlook('info');
-$commit_user = $commit_info[0];
+$commit_user = trim($commit_info[0]);
$commit_date = strtotime(substr($commit_info[1], 0, strlen("0000-00-00 00:00:00
+0000")));
$commit_log = implode("\n", array_slice($commit_info, 3));
@@ -195,6 +194,8 @@
$complete_email . "\r\n" .
".\r\n" .
"QUIT\r\n");
+
+$discard = stream_get_contents($socket);
fclose($socket);
?>