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  9b41397c2f6b5409e4d2b666a92a58b4e2fe0d74 (commit)
      from  49403996761e56c53993af5b0164c736455477b3 (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=9b41397c2f6b5409e4d2b666a92a58b4e2fe0d74

commit 9b41397c2f6b5409e4d2b666a92a58b4e2fe0d74
Author: Franck Villaume <[email protected]>
Date:   Sun Feb 11 20:17:20 2018 +0100

    SCM: make secondary repo delete more robust.

diff --git a/src/common/include/SCMPlugin.class.php 
b/src/common/include/SCMPlugin.class.php
index 7858e0d..73ba5fd 100644
--- a/src/common/include/SCMPlugin.class.php
+++ b/src/common/include/SCMPlugin.class.php
@@ -294,6 +294,9 @@ abstract class SCMPlugin extends Plugin {
        }
 
        function scm_delete_repo(&$params) {
+               if ($params['scm_plugin_id'] != $this->getID()) {
+                       return;
+               }
                $project = $this->checkParams($params);
                if (!$project) {
                        return false;
@@ -326,7 +329,6 @@ abstract class SCMPlugin extends Plugin {
                        return false;
                }
 
-               plugin_hook("scm_admin_update", $params);
                return true;
        }
 
diff --git a/src/plugins/scmgit/common/GitPlugin.class.php 
b/src/plugins/scmgit/common/GitPlugin.class.php
index dd6c790..de8b990 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -1183,6 +1183,7 @@ control over it to the project's administrator.");
                                $deleteForm .= $HTML->html_input('group_id', 
'', '', 'hidden', $params['group_id']);
                                $deleteForm .= 
$HTML->html_input('delete_repository', '', '', 'hidden', 1);
                                $deleteForm .= $HTML->html_input('repo_name', 
'', '', 'hidden', $repo['repo_name']);
+                               $deleteForm .= 
$HTML->html_input('scm_plugin_id', '', '', 'hidden', $this->getID());
                                $deleteForm .= $HTML->html_input('submit', '', 
'', 'submit', _('Delete'));
                                $deleteForm .= $HTML->closeForm();
                                $cells[][] = $deleteForm;
diff --git a/src/www/scm/admin/index.php b/src/www/scm/admin/index.php
index 27e22ae..94ec672 100644
--- a/src/www/scm/admin/index.php
+++ b/src/www/scm/admin/index.php
@@ -64,6 +64,7 @@ if (getStringFromRequest('create_repository') && 
getStringFromRequest('submit'))
        $hook_params['description'] = $description;
        $hook_params['clone'] = $clone;
        $hook_params['error_msg'] = '';
+       $hook_params['scm_plugin'] = getStringFromRequest('scm_plugin');
        plugin_hook_by_reference('scm_add_repo', $hook_params);
        if ($hook_params['error_msg']) {
                $error_msg = $hook_params['error_msg'];
@@ -79,6 +80,7 @@ if (getStringFromRequest('create_repository') && 
getStringFromRequest('submit'))
        $hook_params['group_id'] = $group_id;
        $hook_params['repo_name'] = $repo_name;
        $hook_params['error_msg'] = '';
+       $hook_params['scm_plugin_id'] = getIntFromRequest('scm_plugin_id');
        plugin_hook_by_reference('scm_delete_repo', $hook_params);
        if ($hook_params['error_msg']) {
                $error_msg = $hook_params['error_msg'];

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

Summary of changes:
 src/common/include/SCMPlugin.class.php        | 4 +++-
 src/plugins/scmgit/common/GitPlugin.class.php | 1 +
 src/www/scm/admin/index.php                   | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to