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 7a2b1c5ffdc85eedc9ef0a1bd425a8f9ba1ac18e (commit) via 0e2ce4314c8a31333ed5084f637887092274f822 (commit) from 81683e4fd055b43c0690ee95d8f42478f55c3cbd (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=7a2b1c5ffdc85eedc9ef0a1bd425a8f9ba1ac18e commit 7a2b1c5ffdc85eedc9ef0a1bd425a8f9ba1ac18e Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Fri May 7 09:00:21 2021 +0200 fix RoleComparator & remove unused vars diff --git a/src/common/include/RBAC.php b/src/common/include/RBAC.php index 1cab9fb..4350d72 100644 --- a/src/common/include/RBAC.php +++ b/src/common/include/RBAC.php @@ -4,7 +4,7 @@ * * Copyright 2004, GForge, LLC * Copyright 2009-2010, Roland Mas - * Copyright 2012-2014, Franck Villaume - TrivialDev + * Copyright 2012-2014,2021, Franck Villaume - TrivialDev * Copyright 2012, Thorsten “mirabilos” Glaser <t.gla...@tarent.de> * Copyright 2013, French Ministry of National Education * Copyright 2014, Inria (Sylvain Beucler) @@ -473,9 +473,6 @@ abstract class BaseRole extends FFError { $value = 0; } - $min = PHP_INT_MAX; - $mask = 0; - switch ($section) { case 'forge_admin': return $value; @@ -662,10 +659,7 @@ abstract class BaseRole extends FFError { } function hasPermission($section, $reference, $action = NULL) { - $result = false; $value = $this->getSetting ($section, $reference); - $min = PHP_INT_MAX; - $mask = 0; switch ($section) { case 'forge_admin': @@ -1129,7 +1123,7 @@ abstract class RoleExplicit extends BaseRole implements PFO_RoleExplicit { $ids[] = $user->getID(); } - $res = db_query_params('DELETE FROM pfo_user_role WHERE user_id = ANY($1) AND role_id = $2', + db_query_params('DELETE FROM pfo_user_role WHERE user_id = ANY($1) AND role_id = $2', array(db_int_array_to_any_clause($ids), $this->getID())); foreach ($this->getLinkedProjects() as $p) { @@ -1316,10 +1310,10 @@ class RoleComparator { case 'id': $aid = $a->getID(); $bid = $b->getID(); - if ($a == $b) { + if ($aid == $bid) { return 0; } - return ($a < $b) ? -1 : 1; + return ($aid < $bid) ? -1 : 1; break; case 'composite': default: https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=0e2ce4314c8a31333ed5084f637887092274f822 commit 0e2ce4314c8a31333ed5084f637887092274f822 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Fri May 7 08:59:55 2021 +0200 remove unused var diff --git a/src/common/include/PluginManager.class.php b/src/common/include/PluginManager.class.php index 0f2edde..47ca823 100644 --- a/src/common/include/PluginManager.class.php +++ b/src/common/include/PluginManager.class.php @@ -3,7 +3,7 @@ * FusionForge plugin system * * Copyright 2002-2017, Roland Mas - * Copyright 2014, Franck Villaume - TrivialDev + * Copyright 2014,2021, Franck Villaume - TrivialDev * http://fusionforge.org * * This file is part of FusionForge. FusionForge is free software; @@ -87,7 +87,7 @@ class PluginManager extends FFError { */ function PluginIsInstalled($pluginname) { $plugins_data = $this->getPlugins(); - foreach ($plugins_data as $p_id => $p_name) { + foreach ($plugins_data as $p_name) { if ($p_name == $pluginname) { return true; } @@ -104,7 +104,7 @@ class PluginManager extends FFError { function isPluginAvailable($plugin) { $pluginname = $plugin->GetName(); $plugins_data = $this->getPlugins(); - foreach ($plugins_data as $p_id => $p_name) { + foreach ($plugins_data as $p_name) { if ($p_name == $pluginname) { return true; } ----------------------------------------------------------------------- Summary of changes: src/common/include/PluginManager.class.php | 6 +++--- src/common/include/RBAC.php | 14 ++++---------- 2 files changed, 7 insertions(+), 13 deletions(-) hooks/post-receive -- FusionForge _______________________________________________ Fusionforge-commits mailing list Fusionforge-commits@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits