[Fusionforge-commits] FusionForge branch 6.1 updated. v6.1beta1-165-gd13d095

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Feb 18 19:16:49 CET 2018


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  d13d0950daf37c3d64396fadeb19be0bae37209e (commit)
       via  b662d12b5655fe8aef8e5d6c443a920db1da1175 (commit)
      from  6ebe1de742adf3d8fde4239dd48cc4c9741510c7 (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=d13d0950daf37c3d64396fadeb19be0bae37209e

commit d13d0950daf37c3d64396fadeb19be0bae37209e
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Feb 18 19:16:29 2018 +0100

    scmhook: better handling for clearing hooks

diff --git a/src/plugins/scmhook/common/scmhookPlugin.class.php b/src/plugins/scmhook/common/scmhookPlugin.class.php
index a6a2eb8..9cecfe0 100644
--- a/src/plugins/scmhook/common/scmhookPlugin.class.php
+++ b/src/plugins/scmhook/common/scmhookPlugin.class.php
@@ -119,7 +119,7 @@ project independently.");
 		}
 
 		$existingHooksEnabled = $this->getEnabledHooks($group_id);
-		if (isset($existingHooksEnabled[$scm_plugin])) {
+		if (isset($existingHooksEnabled[$scm_plugin][$repository_name])) {
 			$res = db_query_params('UPDATE plugin_scmhook SET hooks = $1, need_update = 1 WHERE id_group = $2 AND repository_name = $3 AND scm_plugin = $4',
 					array(implode('|', $enabled_hooknames), $group_id, $repository_name, $scm_plugin));
 		} else {
@@ -417,7 +417,7 @@ project independently.");
 			echo $HTML->listTableTop($tabletop, '', 'sortable_scmhook_scmhg', 'sortable', $classth, $titleArr);
 			foreach($repositories as $repository) {
 				$cells = array();
-				$cells[][] = $repository;
+				$cells[][] = $repository.html_e('input', array('type' => 'hidden', 'name' => 'repository['.$repository.'][]');
 				foreach ($hooksServePushPullBundle as $hookServePushPullBundle) {
 					$attr = array('type' => 'checkbox', 'name' => 'repository['.$repository.'][]', 'value' => $hookServePushPullBundle->getLabel().'_'.$hookServePushPullBundle->getClassname());
 					if ((!empty($hookServePushPullBundle->onlyGlobalAdmin) && !Permission::isGlobalAdmin()) || !$hookServePushPullBundle->isAvailable()) {
@@ -484,7 +484,7 @@ project independently.");
 			echo $HTML->listTableTop($tabletop, '', 'sortable_scmhook_scmgit', 'sortable', $classth, $titleArr);
 			foreach($repositories as $repository) {
 				$cells = array();
-				$cells[][] = $repository;
+				$cells[][] = $repository.html_e('input', array('type' => 'hidden', 'name' => 'repository['.$repository.'][]');
 				foreach ($hooksPostReceive as $hookPostReceive) {
 					$attr = array('type' => 'checkbox');
 					if ((!empty($hookPostReceive->onlyGlobalAdmin) && !Permission::isGlobalAdmin()) || !$hookPostReceive->isAvailable()) {
@@ -551,7 +551,7 @@ project independently.");
 			echo $HTML->listTableTop($tabletop, '', 'sortable_scmhook_scmgit', 'sortable', $classth, $titleArr);
 			foreach($repositories as $repository) {
 				$cells = array();
-				$cells[][] = $repository;
+				$cells[][] = $repository.html_e('input', array('type' => 'hidden', 'name' => 'repository['.$repository.'][]');
 				foreach ($hooksPostCommit as $hookPostCommit) {
 					$attr = array('type' => 'checkbox');
 					if ((!empty($hookPostCommit->onlyGlobalAdmin) && !Permission::isGlobalAdmin()) || !$hookPostCommit->isAvailable()) {

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=b662d12b5655fe8aef8e5d6c443a920db1da1175

commit b662d12b5655fe8aef8e5d6c443a920db1da1175
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Feb 18 18:53:10 2018 +0100

    tabs vs. space

diff --git a/src/plugins/scmhook/cronjobs/updateScmRepo.php b/src/plugins/scmhook/cronjobs/updateScmRepo.php
index 29b62fd..b9f0905 100755
--- a/src/plugins/scmhook/cronjobs/updateScmRepo.php
+++ b/src/plugins/scmhook/cronjobs/updateScmRepo.php
@@ -38,9 +38,9 @@ require_once $gfplugins.'scmhook/common/scmhookPlugin.class.php';
 ###### START
 
 $res = db_query_params('SELECT systask_id, group_id, user_name FROM systasks
-	JOIN users ON (systasks.user_id = users.user_id)
-	WHERE systasks.status=$1 AND systask_type=$2',
-	array('WIP', 'SCMHOOK_UPDATE'));
+			JOIN users ON (systasks.user_id = users.user_id)
+			WHERE systasks.status=$1 AND systask_type=$2',
+			array('WIP', 'SCMHOOK_UPDATE'));
 while ($task = db_fetch_array($res)) {
 	$group_id = $task['group_id'];
 	$user_name = $task['user_name'];
@@ -57,13 +57,13 @@ function install_hooks($params) {
 	$group_id = $params[0];
 	// get the list of project to be updated
 	$res = db_query_params('SELECT groups.group_id, groups.scm_box, plugin_scmhook.hooks
-			FROM groups, plugin_scmhook
-			WHERE groups.status = $1
-			AND plugin_scmhook.id_group = groups.group_id
-			AND plugin_scmhook.need_update = $2
-			AND groups.use_scm = $3
-            AND group_id = $4',
-		array('A', 1, 1, $group_id));
+				FROM groups, plugin_scmhook
+				WHERE groups.status = $1
+				AND plugin_scmhook.id_group = groups.group_id
+				AND plugin_scmhook.need_update = $2
+				AND groups.use_scm = $3
+				AND group_id = $4',
+				array('A', 1, 1, $group_id));
 
 	if (! $res) {
 		cron_debug("FATAL Database Query Failed: " . db_error());

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/scmhook/common/scmhookPlugin.class.php |  8 ++++----
 src/plugins/scmhook/cronjobs/updateScmRepo.php     | 20 ++++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list