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  a58af17279027ff2cf1e53c00fab85a3d36e4305 (commit)
      from  12c7437f5cee524970aa89b20fc6052fe66c7d89 (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=a58af17279027ff2cf1e53c00fab85a3d36e4305

commit a58af17279027ff2cf1e53c00fab85a3d36e4305
Author: Franck Villaume <[email protected]>
Date:   Sun Feb 11 18:56:09 2018 +0100

    SCM, secondary repo: make it allow_scm_multiple aware.

diff --git a/src/plugins/scmgit/common/GitPlugin.class.php 
b/src/plugins/scmgit/common/GitPlugin.class.php
index e49b225..645bf42 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -4,9 +4,8 @@
  *
  * Copyright 2009, Roland Mas
  * Copyright 2009, Mehdi Dogguy <[email protected]>
- * Copyright 2012-2014,2016-2017, Franck Villaume - TrivialDev
- * Copyright © 2013
- *     Thorsten Glaser <[email protected]>
+ * Copyright 2013, Thorsten Glaser <[email protected]>
+ * Copyright 2012-2014,2016-2018, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge.
@@ -1055,6 +1054,9 @@ control over it to the project's administrator.");
        }
 
        function scm_add_repo(&$params) {
+               if ($params['scm_plugin'] != $this->name) {
+                       return;
+               }
                $project = $this->checkParams($params);
                if (!$project) {
                        return false;
@@ -1135,7 +1137,6 @@ control over it to the project's administrator.");
                        return false;
                }
 
-               plugin_hook('scm_admin_update', $params);
                return true;
        }
 
@@ -1185,7 +1186,6 @@ 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_enable_anonymous', '', '', 'hidden', 
($project->enableAnonSCM()? 1 : 0));
                                $deleteForm .= $HTML->html_input('submit', '', 
'', 'submit', _('Delete'));
                                $deleteForm .= $HTML->closeForm();
                                $cells[][] = $deleteForm;
@@ -1195,15 +1195,15 @@ control over it to the project's administrator.");
                }
 
                echo html_e('h2', array(), _('Create new Git repository for 
project').' '.$project_name);
-               echo $HTML->openForm(array('name' => 'form_create_repo', 
'action' => getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo $HTML->openForm(array('name' => 'form_create_repo_scmgit', 
'action' => getStringFromServer('PHP_SELF'), 'method' => 'post'));
                echo $HTML->html_input('group_id', '', '', 'hidden', 
$params['group_id']);
                echo $HTML->html_input('create_repository', '', '', 'hidden', 
1);
+               echo $HTML->html_input('scm_plugin', '', '', 'hidden', 
$this->name);
                echo $HTML->html_input('repo_name', '', html_e('strong', 
array(), _('Repository name')._(':')).utils_requiredField(), 'text', '', 
array('required' => 'required', 'size' => 20));
                echo html_e('br');
                echo $HTML->html_input('description', '', html_e('strong', 
array(), _('Description')._(':')), 'text', '', array('size' => 60));
                echo html_e('p', array(), html_e('strong', array(), _('Initial 
clone URL (or name of an existing repository in this project; leave empty to 
start with an empty repository)')._(':')).html_e('br').
                                $HTML->html_input('clone', '', '', 'text', 
$project_name, array('size' => 60)));
-               echo $HTML->html_input('scm_enable_anonymous', '', '', 
'hidden', ($project->enableAnonSCM()? 1 : 0));
                echo html_e('br');
                echo $HTML->html_input('cancel', '', '', 'submit', _('Cancel'), 
array(), array('style' => 'display: inline-block!important'));
                echo $HTML->html_input('submit', '', '', 'submit', _('Submit'), 
array(), array('style' => 'display: inline-block!important'));
diff --git a/src/plugins/scmhg/common/HgPlugin.class.php 
b/src/plugins/scmhg/common/HgPlugin.class.php
index 4387ed0..5387708 100644
--- a/src/plugins/scmhg/common/HgPlugin.class.php
+++ b/src/plugins/scmhg/common/HgPlugin.class.php
@@ -810,6 +810,9 @@ Offer DAV or SSH access.");
        }
 
        function scm_add_repo(&$params) {
+               if ($params['scm_plugin'] != $this->name) {
+                       return;
+               }
                $project = $this->checkParams($params);
                if (!$project) {
                        return false;
@@ -862,7 +865,6 @@ Offer DAV or SSH access.");
                        return false;
                }
 
-               plugin_hook('scm_admin_update', $params);
                return true;
        }
 
@@ -908,7 +910,6 @@ Offer DAV or SSH access.");
                                $deleteForm .= html_e('input', array('type' => 
'hidden', 'name' => 'group_id', 'value' => $params['group_id']));
                                $deleteForm .= html_e('input', array('type' => 
'hidden', 'name' => 'delete_repository', 'value' => 1));
                                $deleteForm .= html_e('input', array('type' => 
'hidden', 'name' => 'repo_name', 'value' => $repo['repo_name']));
-                               $deleteForm .= html_e('input', array('type' => 
'hidden', 'name' => 'scm_enable_anonymous', 'value' => 
($project->enableAnonSCM()? 1 : 0)));
                                $deleteForm .= html_e('input', array('type' => 
'submit', 'name' => 'submit', 'value' => _('Delete')));
                                $deleteForm .= $HTML->closeForm();
                                $cells[][] = $deleteForm;
@@ -918,16 +919,16 @@ Offer DAV or SSH access.");
                }
 
                echo html_e('h2', array(), sprintf(_('Create new Hg repository 
for project %s'), $project_name));
-               echo $HTML->openForm(array('name' => 'form_create_repo', 
'action' => getStringFromServer('PHP_SELF'), 'method' => 'post'));
-               echo html_e('input', array('type' => 'hidden', 'name' => 
'group_id', 'value' => $params['group_id']));
-               echo html_e('input', array('type' => 'hidden', 'name' => 
'create_repository', 'value' => 1));
-               echo html_e('p', array(), html_e('strong', array(), 
_('Repository name')._(':')).utils_requiredField().html_e('br').
-                               html_e('input', array('type' => 'text', 
'required' => 'required', 'size' => 20, 'name' => 'repo_name', 'value' => '')));
-               echo html_e('p', array(), html_e('strong', array(), 
_('Description')._(':')).html_e('br').
-                               html_e('input', array('type' => 'text', 'size' 
=> 60, 'name' => 'description', 'value' => '')));
-               echo html_e('input', array('type' => 'hidden', 'name' => 
'scm_enable_anonymous', 'value' => ($project->enableAnonSCM()? 1 : 0)));
-               echo html_e('input', array('type' => 'submit', 'name' => 
'cancel', 'value' => _('Cancel')));
-               echo html_e('input', array('type' => 'submit', 'name' => 
'submit', 'value' => _('Submit')));
+               echo $HTML->openForm(array('name' => 'form_create_repo_scmhg', 
'action' => getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo $HTML->html_input('group_id', '', '', 'hidden', 
$params['group_id']);
+               echo $HTML->html_input('create_repository', '', '', 'hidden', 
1);
+               echo $HTML->html_input('scm_plugin', '', '', 'hidden', 
$this->name);
+               echo $HTML->html_input('repo_name', '', html_e('strong', 
array(), _('Repository name')._(':')).utils_requiredField(), 'text', '', 
array('required' => 'required', 'size' => 20));
+               echo html_e('br');
+               echo $HTML->html_input('description', '', html_e('strong', 
array(), _('Description')._(':')), 'text', '', array('size' => 60));
+               echo html_e('br');
+               echo $HTML->html_input('cancel', '', '', 'submit', _('Cancel'), 
array(), array('style' => 'display: inline-block!important'));
+               echo $HTML->html_input('submit', '', '', 'submit', _('Submit'), 
array(), array('style' => 'display: inline-block!important'));
                echo $HTML->closeForm();
                if ($project->usesPlugin('scmhook')) {
                        $scmhookPlugin = plugin_get_object('scmhook');
diff --git a/src/www/scm/admin/index.php b/src/www/scm/admin/index.php
index f910223..27e22ae 100644
--- a/src/www/scm/admin/index.php
+++ b/src/www/scm/admin/index.php
@@ -64,7 +64,6 @@ if (getStringFromRequest('create_repository') && 
getStringFromRequest('submit'))
        $hook_params['description'] = $description;
        $hook_params['clone'] = $clone;
        $hook_params['error_msg'] = '';
-       $hook_params['scm_enable_anonymous'] = 
getIntFromRequest('scm_enable_anonymous');
        plugin_hook_by_reference('scm_add_repo', $hook_params);
        if ($hook_params['error_msg']) {
                $error_msg = $hook_params['error_msg'];
@@ -80,7 +79,6 @@ 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_enable_anonymous'] = 
getIntFromRequest('scm_enable_anonymous');
        plugin_hook_by_reference('scm_delete_repo', $hook_params);
        if ($hook_params['error_msg']) {
                $error_msg = $hook_params['error_msg'];

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

Summary of changes:
 src/plugins/scmgit/common/GitPlugin.class.php | 14 +++++++-------
 src/plugins/scmhg/common/HgPlugin.class.php   | 25 +++++++++++++------------
 src/www/scm/admin/index.php                   |  2 --
 3 files changed, 20 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
FusionForge

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

Reply via email to