--- eventum-20060324/misc/scm/process_cvs_commits.php 2006-03-28 12:21:12.000000000 +0300 +++ /home/glen/scm 2006-03-28 12:24:01.000000000 +0300 @@ -66,19 +67,21 @@ $commit_msg = substr($input, strpos($input, 'Log Message:')+strlen('Log Message:')+1); // parse the commit message and get the first issue number we can find $pattern = "/(?:issue|bug) ?:? ?#?(\d+)/i"; -preg_match($pattern, $commit_msg, $matches); +preg_match_all($pattern, $commit_msg, $matches); if (count($matches) > 1) { // need to encode all of the url arguments - $issue_id = rawurlencode($matches[1]); $commit_msg = rawurlencode($commit_msg); $cvs_module = rawurlencode($cvs_module); $username = rawurlencode($username); // build the GET url to use $ping_url = $eventum_relative_url . "scm_ping.php?module=$cvs_module&username=$username&commit_msg=$commit_msg"; - $ping_url .= "&issue[]=$issue_id"; + foreach ($matches[1] as $issue_id) { + $ping_url .= "&issue[]=$issue_id"; + } + for ($i = 0; $i < count($modified_files); $i++) { $ping_url .= "&files[$i]=" . rawurlencode($modified_files[$i]['filename']); $ping_url .= "&old_versions[$i]=" . rawurlencode($modified_files[$i]['old_revision']);