]>
Commit | Line | Data |
---|---|---|
e05be4bc ER |
1 | --- eventum-20060324/misc/scm/process_cvs_commits.php 2006-03-28 12:21:12.000000000 +0300 |
2 | +++ /home/glen/scm 2006-03-28 12:24:01.000000000 +0300 | |
3 | @@ -66,19 +67,21 @@ | |
4 | $commit_msg = substr($input, strpos($input, 'Log Message:')+strlen('Log Message:')+1); | |
5 | ||
6 | // parse the commit message and get the first issue number we can find | |
a8176a75 | 7 | $pattern = "/(?:issue|bug) ?:? ?#?(\d+)/i"; |
e05be4bc | 8 | -preg_match($pattern, $commit_msg, $matches); |
e05be4bc ER |
9 | +preg_match_all($pattern, $commit_msg, $matches); |
10 | ||
11 | if (count($matches) > 1) { | |
12 | // need to encode all of the url arguments | |
13 | - $issue_id = rawurlencode($matches[1]); | |
14 | $commit_msg = rawurlencode($commit_msg); | |
15 | $cvs_module = rawurlencode($cvs_module); | |
16 | $username = rawurlencode($username); | |
17 | ||
18 | // build the GET url to use | |
19 | $ping_url = $eventum_relative_url . "scm_ping.php?module=$cvs_module&username=$username&commit_msg=$commit_msg"; | |
20 | - $ping_url .= "&issue[]=$issue_id"; | |
21 | + foreach ($matches[1] as $issue_id) { | |
22 | + $ping_url .= "&issue[]=$issue_id"; | |
23 | + } | |
24 | + | |
25 | for ($i = 0; $i < count($modified_files); $i++) { | |
26 | $ping_url .= "&files[$i]=" . rawurlencode($modified_files[$i]['filename']); | |
27 | $ping_url .= "&old_versions[$i]=" . rawurlencode($modified_files[$i]['old_revision']); |