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  df93cd7aebf229fc34eea65883eb3998541ed6ce (commit)
       via  2a05e98bc3866bc5fe6718c18087e4e6a6e1b42a (commit)
      from  43fb6d0de28077f35f0102a945aba505ba0a868b (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=df93cd7aebf229fc34eea65883eb3998541ed6ce

commit df93cd7aebf229fc34eea65883eb3998541ed6ce
Author: Franck Villaume <[email protected]>
Date:   Sun May 16 23:21:14 2021 +0200

    initialize variable to avoid uncaught error with PHP8

diff --git a/src/www/scm/admin/index.php b/src/www/scm/admin/index.php
index 69000eb..8088765 100644
--- a/src/www/scm/admin/index.php
+++ b/src/www/scm/admin/index.php
@@ -184,6 +184,7 @@ $hook_params['group_id'] = $group_id ;
 
 $SCMFactory = new SCMFactory();
 $scm_plugins = $SCMFactory->getSCMs();
+$scmPluginObjects = array();
 if (!empty($scm_plugins)) {
        echo $HTML->information(_('Note: Changing the repository does not 
delete the previous repository. It only affects the information displayed under 
the SCM tab.'));
        if (count($scm_plugins) == 1) {

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

commit 2a05e98bc3866bc5fe6718c18087e4e6a6e1b42a
Author: Franck Villaume <[email protected]>
Date:   Sun May 16 23:20:10 2021 +0200

    clean-up: remove duplicate code

diff --git a/src/plugins/scmgit/common/GitPlugin.class.php 
b/src/plugins/scmgit/common/GitPlugin.class.php
index 20789b3..3940e40 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -283,7 +283,6 @@ control over it to the project's administrator.");
                if ($params['scm_plugin'] != $this->name) {
                        return;
                }
-               global $HTML;
                $project = $this->checkParams($params);
                if (!$project) {
                        return;
@@ -438,9 +437,9 @@ control over it to the project's administrator.");
                $output = '';
 
                $project = $this->checkParams($params);
-               if (!$project) return false;
-               if (!$project->isActive()) return false;
-
+               if (!$project) {
+                       return false;
+               }
                $project_name = $project->getUnixName();
                $unix_group_ro = $project_name . '_scmro';
                $unix_group_rw = $project_name . '_scmrw';
@@ -769,16 +768,21 @@ control over it to the project's administrator.");
                                } else {
                                        // Short-commit stats line
                                        $result = 
preg_match("/^(?P<mode>[AMD])\s+(?P<file>.+)$/", $line, $matches);
-                                       if (!$result)
+                                       if (!$result) {
                                                continue;
-                                       if ($last_user == "")
+                                       }
+                                       if ($last_user == "") {
                                                continue;
-                                       if (!isset($usr_adds[$last_user]))
+                                       }
+                                       if (!isset($usr_adds[$last_user])) {
                                                $usr_adds[$last_user] = 0;
-                                       if (!isset($usr_updates[$last_user]))
+                                       }
+                                       if (!isset($usr_updates[$last_user])) {
                                                $usr_updates[$last_user] = 0;
-                                       if (!isset($usr_deletes[$last_user]))
+                                       }
+                                       if (!isset($usr_deletes[$last_user])) {
                                                $usr_deletes[$last_user] = 0;
+                                       }
                                        if ($matches['mode'] == 'A') {
                                                $usr_adds[$last_user]++;
                                                $adds++;
@@ -970,7 +974,7 @@ control over it to the project's administrator.");
                        $project = group_get_object($row['group_id']);
                        if (!$project || !is_object($project)) {
                                continue;
-                       } elseif ($project->isError()) {
+                       } elseif ($project->isError() || !$project->isActive()) 
{
                                continue;
                        }
                        if (!$project->usesPlugin($this->name)) {
@@ -1237,10 +1241,11 @@ control over it to the project's administrator.");
                        // Grab&parse commit log
                        $protocol = forge_get_config('use_ssl', 'scmgit') ? 
'https://' : 'http://';
                        $u = session_get_user();
-                       if ($project->enableAnonSCM())
+                       if ($project->enableAnonSCM()) {
                                $server_script = '/anonscm/gitlog';
-                       else
+                       } else {
                                $server_script = 
'/authscm/'.$u->getUnixName().'/gitlog';
+                       }
                        if ($user) {
                                $email = $user->getEmail();
                                $realname = $user->getFirstName().' 
'.$user->getLastName();
@@ -1539,8 +1544,3 @@ control over it to the project's administrator.");
                return $repoarr;
        }
 }
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:

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

Summary of changes:
 src/plugins/scmgit/common/GitPlugin.class.php | 34 +++++++++++++--------------
 src/www/scm/admin/index.php                   |  1 +
 2 files changed, 18 insertions(+), 17 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