This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "FusionForge".
The branch, 6.1 has been updated via 23c87cd69e2493ede67d5947f24da57517c5d2b2 (commit) from dd325324f1d30f9491fb1b7e5babb03e49c9b292 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=23c87cd69e2493ede67d5947f24da57517c5d2b2 commit 23c87cd69e2493ede67d5947f24da57517c5d2b2 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Fri Mar 16 15:17:44 2018 +0000 scmgit: initial fix for multirepo support in 5 latest commits widget diff --git a/src/plugins/scmgit/common/GitPlugin.class.php b/src/plugins/scmgit/common/GitPlugin.class.php index c37ba61..7cfc8eb 100644 --- a/src/plugins/scmgit/common/GitPlugin.class.php +++ b/src/plugins/scmgit/common/GitPlugin.class.php @@ -1244,42 +1244,46 @@ control over it to the project's administrator."); } else { $params = '&mode=latest'; } - $script_url = $protocol.$this->getBoxForProject($project) - . $server_script - .'?unix_group_name='.$project->getUnixName() - . $params - .'&limit='.$nb_commits; - $filename = tempnam('/tmp', 'gitlog'); - $f = fopen($filename, 'w'); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $script_url); - curl_setopt($ch, CURLOPT_FILE, $f); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($ch, CURLOPT_COOKIE, $_SERVER['HTTP_COOKIE']); // for session validation - curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // for session validation - curl_setopt($ch, CURLOPT_HTTPHEADER, - array('X-Forwarded-For: '.$_SERVER['REMOTE_ADDR'])); // for session validation - $body = curl_exec($ch); - if ($body === false) { - $this->setError(curl_error($ch)); - } - curl_close($ch); - fclose($f); // flush buffer - $f = fopen($filename, 'r'); - unlink($filename); + $repo_list = $this->getRepositories($project); + foreach ($repo_list as $repo_name) { + $script_url = $protocol.$this->getBoxForProject($project) + . $server_script + .'?unix_group_name='.$project->getUnixName() + .'&repo_name='.$repo_name + . $params + .'&limit='.$nb_commits; + $filename = tempnam('/tmp', 'gitlog'); + $f = fopen($filename, 'w'); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $script_url); + curl_setopt($ch, CURLOPT_FILE, $f); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_COOKIE, $_SERVER['HTTP_COOKIE']); // for session validation + curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // for session validation + curl_setopt($ch, CURLOPT_HTTPHEADER, + array('X-Forwarded-For: '.$_SERVER['REMOTE_ADDR'])); // for session validation + $body = curl_exec($ch); + if ($body === false) { + $this->setError(curl_error($ch)); + } + curl_close($ch); + fclose($f); // flush buffer + $f = fopen($filename, 'r'); + unlink($filename); - $i = 0; - while (!feof($f) && $data = fgets($f)) { - $line = trim($data); - $splitedLine = explode('||', $line); - if (sizeof($splitedLine) == 4) { - $commits[$i]['pluginName'] = $this->name; - $commits[$i]['description'] = htmlspecialchars($splitedLine[2]); - $commits[$i]['commit_id'] = $splitedLine[3]; - $splitedDate = explode(' ', $splitedLine[0]); - $commits[$i]['date'] = $splitedDate[0]; - $i++; + $i = 0; + while (!feof($f) && $data = fgets($f)) { + $line = trim($data); + $splitedLine = explode('||', $line); + if (sizeof($splitedLine) == 4) { + $commits[$i]['pluginName'] = $this->name; + $commits[$i]['description'] = htmlspecialchars($splitedLine[2]); + $commits[$i]['commit_id'] = $splitedLine[3]; + $splitedDate = explode(' ', $splitedLine[0]); + $commits[$i]['date'] = $splitedDate[0]; + $i++; + } } } } ----------------------------------------------------------------------- Summary of changes: src/plugins/scmgit/common/GitPlugin.class.php | 74 ++++++++++++++------------- 1 file changed, 39 insertions(+), 35 deletions(-) hooks/post-receive -- FusionForge _______________________________________________ Fusionforge-commits mailing list Fusionforge-commits@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits