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, master has been updated
via bff8babd7dff7d885566355a7da89774e3bb3490 (commit)
from d6be8deb902080cfa8ce9d8edd1c8cd4cd0b9681 (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=bff8babd7dff7d885566355a7da89774e3bb3490
commit bff8babd7dff7d885566355a7da89774e3bb3490
Author: Franck Villaume <[email protected]>
Date: Fri Nov 25 15:04:19 2016 +0100
scmhook: fix strings, prepare integration with new artifact display widget
system
diff --git a/src/plugins/scmhook/library/scmgit/commitTracker.class.php
b/src/plugins/scmhook/library/scmgit/commitTracker.class.php
index 60570d0..f82dc1a 100644
--- a/src/plugins/scmhook/library/scmgit/commitTracker.class.php
+++ b/src/plugins/scmhook/library/scmgit/commitTracker.class.php
@@ -1,12 +1,12 @@
<?php
/**
- * scmhook commitTracker Plugin Class
+ * scmhook GitCommitTracker Plugin Class
* Copyright 2004, Francisco Gimeno <kikov @nospam@ kikov.org>
* Copyright 2005, Guillaume Smet <[email protected]>
* Copyright 2011, Franck Villaume - Capgemini
* Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
* Copyright 2013-2014, Benoit Debaenst - TrivialDev
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2016, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -46,10 +46,7 @@ class GitCommitTracker extends scmhook {
function isAvailable() {
if (!$this->group->usesTracker()) {
- $this->disabledMessage = _('Hook not available due to
missing dependency: Project not using tracker.');
- return false;
- } elseif (!forge_get_config('use_ssh','scmgit')) {
- $this->disabledMessage = _('Hook not available due to
missing dependency: Forge not using SSH for Git.');
+ $this->disabledMessage = _('Hook not available due to
missing dependency')._(': ')._('Project not using tracker.');
return false;
}
return true;
@@ -67,22 +64,33 @@ class GitCommitTracker extends scmhook {
ORDER BY git_date',
array($params['artifact_id']));
if (!$DBResult) {
- echo $HTML->error_msg(_('Unable to retrieve data'));
+ $return = $HTML->error_msg(_('Unable to retrieve
data'));
+ } else {
+ $return = $this->getCommitEntries($DBResult,
$params['group_id']);
+ }
+ if (isset($params['content'])) {
+ $params['content'] = $return;
} else {
- $this->getCommitEntries($DBResult, $params['group_id']);
+ echo $return;
}
}
function task_extra_detail($params) {
+ $return = '';
$DBResult = db_query_params ('SELECT * FROM
plugin_scmhook_scmgit_committracker_data_master,
plugin_scmhook_scmgit_committracker_data_artifact
WHERE
plugin_scmhook_scmgit_committracker_data_artifact.project_task_id=$1
AND
plugin_scmhook_scmgit_committracker_data_master.holder_id=plugin_scmhook_scmgit_committracker_data_artifact.id
ORDER BY git_date',
array($params['task_id']));
if (!$DBResult) {
- echo $HTML->error_msg(_('Unable to retrieve data'));
+ $return = $HTML->error_msg(_('Unable to retrieve
data'));
+ } else {
+ $return = $this->getCommitEntries($DBResult,
$params['group_id']);
+ }
+ if (isset($params['content'])) {
+ $params['content'] = $return;
} else {
- $this->getCommitEntries($DBResult, $params['group_id']);
+ echo $return;
}
}
@@ -97,13 +105,14 @@ class GitCommitTracker extends scmhook {
global $HTML;
$group = group_get_object($group_id);
$Rows= db_numrows($DBResult);
+ $return = '';
if ($Rows > 0) {
echo '<tr><td>';
- echo html_e('h2', array(), _('Related Git commits'),
false);
+ $return .= html_e('h2', array(), _('Related Git
commits'), false);
$title_arr = $this->getTitleArr($group_id);
- echo $HTML->listTableTop($title_arr);
+ $return .= $HTML->listTableTop($title_arr);
for ($i=0; $i<$Rows; $i++) {
$Row = db_fetch_array($DBResult);
@@ -114,11 +123,12 @@ class GitCommitTracker extends scmhook {
$cells[][] =
$this->getActualVersionLink($group->getUnixName(), $Row['file'],
$Row['actual_version']);
$cells[][] = htmlspecialchars($Row['log_text']);
$cells[][] = util_make_link_u($Row['author'],
user_get_object_by_name($Row['author'])->getId(), $Row['author']);
- echo $HTML->multiTableRow(array('class' =>
$HTML->boxGetAltRowStyle($i, true)), $cells);
+ $return .= $HTML->multiTableRow(array('class'
=> $HTML->boxGetAltRowStyle($i, true)), $cells);
}
- echo $HTML->listTableBottom();
- echo '</td></tr>';
+ $return .= $HTML->listTableBottom();
+ $return .= '</td></tr>';
}
+ return $return;
}
/**
diff --git a/src/plugins/scmhook/library/scmgit/hooks/committracker/post.php
b/src/plugins/scmhook/library/scmgit/hooks/committracker/post.php
index 94d120e..b9f2ffb 100755
--- a/src/plugins/scmhook/library/scmgit/hooks/committracker/post.php
+++ b/src/plugins/scmhook/library/scmgit/hooks/committracker/post.php
@@ -1,7 +1,7 @@
#! /usr/bin/php
<?php
/**
- * Fusionforge Plugin SVNTracker HTTPPoster
+ * Fusionforge Plugin Git Tracker HTTPPoster
*
* Portions Copyright 2004 (c) Roland Mas <99.roland.mas @nospam@ aist.enst.fr>
* The rest Copyright 2004 (c) Francisco Gimeno <kikov @nospam@ kikov.org>
diff --git a/src/plugins/scmhook/library/scmgit/postReceiveEmail.class.php
b/src/plugins/scmhook/library/scmgit/postReceiveEmail.class.php
index a568b64..a7ab27a 100644
--- a/src/plugins/scmhook/library/scmgit/postReceiveEmail.class.php
+++ b/src/plugins/scmhook/library/scmgit/postReceiveEmail.class.php
@@ -1,7 +1,8 @@
<?php
/**
- * scmhook postReceiveEmail Plugin Class
+ * scmhook GitPostReceiveEmail Plugin Class
* Copyright 2013, Benoit Debaenst - TrivialDev
+ * Copyright 2016, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -43,7 +44,7 @@ class GitPostReceiveEmail extends scmhook {
require_once $gfcommon.'mail/MailingList.class.php';
require_once $gfcommon.'mail/MailingListFactory.class.php';
- if ($this->group->usesMail() &&
forge_get_config('use_ssh','scmgit')) {
+ if ($this->group->usesMail()) {
$mlFactory = new MailingListFactory($this->group);
$mlArray = $mlFactory->getMailingLists();
$mlCount = count($mlArray);
@@ -52,11 +53,9 @@ class GitPostReceiveEmail extends scmhook {
if ($currentList->getListEmail() ==
$this->group->getUnixName().'-commits@'.forge_get_config('lists_host'))
return true;
}
- $this->disabledMessage = _('Hook not available due to
missing dependency: Project has no commit mailing-list:
').$this->group->getUnixName().'-commits';
+ $this->disabledMessage = _('Hook not available due to
missing dependency')._(': ')._('Project has no commit mailing-list:
').$this->group->getUnixName().'-commits';
} elseif (!$this->group->usesMail()) {
- $this->disabledMessage = _('Hook not available due to
missing dependency: Project not using mailing-list.');
- } elseif (!forge_get_config('use_ssh','scm_git')) {
- $this->disabledMessage = _('Hook not available due to
missing dependency: Forge not using SSH for Git.');
+ $this->disabledMessage = _('Hook not available due to
missing dependency')._(': ')._('Project not using mailing-list.');
}
return false;
}
-----------------------------------------------------------------------
Summary of changes:
.../scmhook/library/scmgit/commitTracker.class.php | 40 ++++++++++++++--------
.../library/scmgit/hooks/committracker/post.php | 2 +-
.../library/scmgit/postReceiveEmail.class.php | 11 +++---
3 files changed, 31 insertions(+), 22 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits