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  7516b792e2e15833353f3ab1b07af47a7a90fef5 (commit)
      from  fb22e4f3391caba1662535fed90819d7d49020fb (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=7516b792e2e15833353f3ab1b07af47a7a90fef5

commit 7516b792e2e15833353f3ab1b07af47a7a90fef5
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Thu May 13 21:27:26 2021 +0200

    clean-up: remove unused var & curly braces

diff --git a/src/common/include/Group.class.php 
b/src/common/include/Group.class.php
index e446b5b..336a820 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -2553,7 +2553,7 @@ class Group extends FFError {
                if (!$seen_admin_role) {
                        $role = new Role($this);
                        $adminperms = array('project_admin' => array 
($this->getID() => 1));
-                       $role_id = $role->create ('Admin', $adminperms, true);
+                       $role->create ('Admin', $adminperms, true);
                }
 
                $roles = $this->getRoles();
diff --git a/src/common/include/Plugin.class.php 
b/src/common/include/Plugin.class.php
index 6d6ce0b..38758cc 100644
--- a/src/common/include/Plugin.class.php
+++ b/src/common/include/Plugin.class.php
@@ -167,10 +167,6 @@ class Plugin extends FFError {
                return 'plugins/'.$this->name.'/themes/default';
        }
 
-       function registerRoleValues(&$params, $values) {
-               $role =& $params['role'];
-       }
-
        function install() {
                $this->installCode();
                $this->installConfig();
diff --git a/src/common/include/config.php b/src/common/include/config.php
index dee68dd..700a1ab 100644
--- a/src/common/include/config.php
+++ b/src/common/include/config.php
@@ -187,26 +187,24 @@ function forge_get_config_array () {
        return $ret ;
 }
 
-function forge_set_vars_from_config () {
-       $c = FusionForgeConfig::get_instance () ;
-
+function forge_set_vars_from_config() {
        foreach (func_get_args() as $item) {
-               if (is_array ($item)) {
-                       $var = $item[0] ;
-                       $x = $var ;
+               if (is_array($item)) {
+                       $var = $item[0];
+                       $x = $var;
                        if (isset ($item[1])) {
-                               $section = $item[1] ;
-                               $x = $section.'__'.$var ;
-                               $value = forge_get_config ($var, $section) ;
+                               $section = $item[1];
+                               $x = $section.'__'.$var;
+                               $value = forge_get_config($var, $section);
                        }
                } else {
-                       $var = $item ;
-                       $x = $item ;
-                       $value = forge_get_config ($var) ;
+                       $var = $item;
+                       $x = $item;
+                       $value = forge_get_config($var);
                }
 
-               global $$x ;
-               $$x = $value ;
+               global $$x;
+               $$x = $value;
        }
 }
 
diff --git a/src/common/widget/Widget_MyMonitoredDocuments.class.php 
b/src/common/widget/Widget_MyMonitoredDocuments.class.php
index 7b6f47e..1813889 100644
--- a/src/common/widget/Widget_MyMonitoredDocuments.class.php
+++ b/src/common/widget/Widget_MyMonitoredDocuments.class.php
@@ -124,7 +124,8 @@ class Widget_MyMonitoredDocuments extends Widget {
                if (!forge_get_config('use_docman')) {
                        return false;
                }
-               foreach 
(UserManager::instance()->getCurrentUser()->getGroups(false) as $p) {
+               $user = session_get_user();
+               foreach ($user->getGroups(false) as $p) {
                        if ($p->usesDocman()) {
                                return true;
                        }
diff --git a/src/common/widget/Widget_MySurveys.class.php 
b/src/common/widget/Widget_MySurveys.class.php
index 5e54d7c..99639c7 100644
--- a/src/common/widget/Widget_MySurveys.class.php
+++ b/src/common/widget/Widget_MySurveys.class.php
@@ -39,19 +39,19 @@ class Widget_MySurveys extends Widget {
        function __construct() {
                global $HTML;
                parent::__construct('mysurveys');
-               $this->_survey_show = 
UserManager::instance()->getCurrentUser()->getPreference('my_surveys_show');
+               $user = session_get_user();
+               $this->_survey_show = $user->getPreference('my_surveys_show');
                if($this->_survey_show === false) {
                        $this->_survey_show = 'AN';
-                       
UserManager::instance()->getCurrentUser()->setPreference('my_surveys_show', 
$this->_survey_show);
+                       $user->setPreference('my_surveys_show', 
$this->_survey_show);
                }
-               $user = session_get_user();
                $projects = $user->getGroups();
                sortProjectList($projects);
                $tmp = array();
                foreach ($projects as $p) {
                        if ($p->usesSurvey()) {
                                $sf = new SurveyFactory($p);
-                               if (!empty($sf->getSurveysIds()) {
+                               if (!empty($sf->getSurveysIds())) {
                                        $tmp[] = $p;
                                }
                        }
@@ -164,7 +164,8 @@ class Widget_MySurveys extends Widget {
                                        $this->_survey_show = 'AN';
                                        break;
                        }
-                       
UserManager::instance()->getCurrentUser()->setPreference('my_surveys_show', 
$this->_survey_show);
+                       $user = session_get_user();
+                       $user->setPreference('my_surveys_show', 
$this->_survey_show);
                }
                return true;
        }
diff --git 
a/src/plugins/mantisbt/common/mantisbt_Widget_ProjectLastIssues.class.php 
b/src/plugins/mantisbt/common/mantisbt_Widget_ProjectLastIssues.class.php
index 16b958d..1d9b7f4 100644
--- a/src/plugins/mantisbt/common/mantisbt_Widget_ProjectLastIssues.class.php
+++ b/src/plugins/mantisbt/common/mantisbt_Widget_ProjectLastIssues.class.php
@@ -45,7 +45,6 @@ class mantisBT_Widget_ProjectLastIssues extends Widget {
                $mantisbtConf = $mantisbt->getMantisBTConf($group_id);
                $group = group_get_object($group_id);
                if (session_loggedin()) {
-                       $user = session_get_user();
                        $userperm = $group->getPermission();
                        if ($userperm->IsMember()) {
                                $mantisbtUserConf = 
$mantisbt->getUserConf($mantisbtConf['url']);
diff --git a/src/plugins/mediawiki/common/mediawikiPlugin.class.php 
b/src/plugins/mediawiki/common/mediawikiPlugin.class.php
index d08d687..db713b1 100644
--- a/src/plugins/mediawiki/common/mediawikiPlugin.class.php
+++ b/src/plugins/mediawiki/common/mediawikiPlugin.class.php
@@ -97,7 +97,6 @@ _('This plugin allows each project to embed Mediawiki under a 
tab.');
                                $params['TITLES'][] = $this->text;
                                $params['DIRS'][] = 
util_make_uri('/plugins/'.$this->name.'/wiki/'.$project->getUnixName().'/index.php');
                                if (session_loggedin()) {
-                                       $user = session_get_user();
                                        $userperm = $project->getPermission();
                                        if ($userperm->isAdmin()) {
                                                $params['ADMIN'][] = 
util_make_uri('/plugins/'.$this->name.'/plugin_admin.php?group_id='.$project->getID());
diff --git a/src/plugins/scmbzr/common/BzrPlugin.class.php 
b/src/plugins/scmbzr/common/BzrPlugin.class.php
index 49f221b..fca26be 100644
--- a/src/plugins/scmbzr/common/BzrPlugin.class.php
+++ b/src/plugins/scmbzr/common/BzrPlugin.class.php
@@ -243,12 +243,12 @@ over it to the project's administrator.");
                closedir($dh) ;
                sort ($oldlist) ;
 
-                $newlist = array () ;
-                foreach ($groups as $project) {
-                        if ($this->browserDisplayable ($project)) {
-                                $newlist[] = $project->getUnixName() ;
-                        }
-                }
+               $newlist = array () ;
+               foreach ($groups as $project) {
+                       if ($this->browserDisplayable ($project)) {
+                               $newlist[] = $project->getUnixName() ;
+                       }
+               }
                sort ($newlist) ;
 
                $dellist = array () ;
@@ -278,20 +278,19 @@ over it to the project's administrator.");
        }
 
        function gatherStats($params) {
-                $project = $this->checkParams($params);
-                if (!$project) {
-                        return false ;
-                }
+               $project = $this->checkParams($params);
+               if (!$project) {
+                       return false ;
+               }
 
-                if ($params['mode'] == 'day') {
-                        db_begin();
+               if ($params['mode'] == 'day') {
+                       db_begin();
 
-                        $year = $params ['year'] ;
-                        $month = $params ['month'] ;
-                        $day = $params ['day'] ;
-                        $month_string = sprintf( "%04d%02d", $year, $month );
-                        $start_time = gmmktime( 0, 0, 0, $month, $day, $year);
-                        $end_time = $start_time + 86400;
+                       $year = $params ['year'] ;
+                       $month = $params ['month'] ;
+                       $day = $params ['day'] ;
+                       $month_string = sprintf( "%04d%02d", $year, $month );
+                       $start_time = gmmktime( 0, 0, 0, $month, $day, $year);
 
                        $date = sprintf ("%04d-%02d-%02d", $year, $month, $day);
 
@@ -320,27 +319,25 @@ over it to the project's administrator.");
                                                        $day,
                                                        $project->getID(),
                                                        
$project->getUnixName()));
-                        if(!$res) {
-                                echo "Error while cleaning stats_cvs_group\n";
-                                db_rollback () ;
-                                return false ;
-                        }
+                       if(!$res) {
+                               echo "Error while cleaning stats_cvs_group\n";
+                               db_rollback () ;
+                               return false ;
+                       }
 
                        $res = db_query_params('DELETE FROM stats_cvs_user 
WHERE month = $1 AND day = $2 AND group_id = $3 AND reponame = $4',
                                                array ($month_string,
                                                        $day,
                                                        $project->getID(),
                                                        
$project->getUnixName()));
-                        if(!$res) {
-                                echo "Error while cleaning stats_cvs_user\n" ;
-                                db_rollback () ;
-                                return false ;
-                        }
+                       if(!$res) {
+                               echo "Error while cleaning stats_cvs_user\n" ;
+                               db_rollback () ;
+                               return false ;
+                       }
 
                         // Analyzing history stream
                        $sep = 
'------------------------------------------------------------' ;
-                       $currev = '' ;
-                       $curuser = '' ;
                        $curdate = '' ;
                        $state = '' ;
                        $curadds = 0 ;
@@ -419,17 +416,17 @@ over it to the project's administrator.");
                                }
                        }
 
-                        // building the user list
-                        $user_list = array_unique( array_merge( array_keys( 
$usr_adds ), array_keys( $usr_updates ), array_keys( $usr_commits ) ) );
-
-                        foreach ( $user_list as $user ) {
-                                // trying to get user id from user name
-                                $u = user_get_object_by_name ($user) ;
-                                if ($u) {
-                                        $user_id = $u->getID();
-                                } else {
-                                        continue;
-                                }
+                       // building the user list
+                       $user_list = array_unique( array_merge( array_keys( 
$usr_adds ), array_keys( $usr_updates ), array_keys( $usr_commits ) ) );
+
+                       foreach ( $user_list as $user ) {
+                               // trying to get user id from user name
+                               $u = user_get_object_by_name ($user) ;
+                               if ($u) {
+                                       $user_id = $u->getID();
+                               } else {
+                                       continue;
+                               }
 
                                $uc = $usr_commits[$user] ? $usr_commits[$user] 
: 0 ;
                                $uu = $usr_updates[$user] ? $usr_updates[$user] 
: 0 ;
diff --git a/src/plugins/scmccase/common/CCasePlugin.class.php 
b/src/plugins/scmccase/common/CCasePlugin.class.php
index d3c0a1b..92038d1 100644
--- a/src/plugins/scmccase/common/CCasePlugin.class.php
+++ b/src/plugins/scmccase/common/CCasePlugin.class.php
@@ -128,8 +128,6 @@ class CCasePlugin extends SCMPlugin {
        }
 
        function scm_admin_update ($params) {
-               $group = group_get_object($params['group_id']);
-
                if ($params['scmccase_ccase_server'] && 
$params['scmccase_ccase_server'] != "") {
                        $this->SetGroupServer ($params['group_id'], 
$params['scmccase_ccase_server']) ;
                } else {
diff --git a/src/plugins/scmcvs/cronjobs/cvs.php 
b/src/plugins/scmcvs/cronjobs/cvs.php
index 14568dd..151ab08 100755
--- a/src/plugins/scmcvs/cronjobs/cvs.php
+++ b/src/plugins/scmcvs/cronjobs/cvs.php
@@ -1,7 +1,7 @@
 #! /usr/bin/php
 <?php
 /**
- * GForge Cron Job
+ * FusionForge Cron Job
  *
  * The rest Copyright 2002-2005 (c) GForge Team
  * http://fusionforge.org/
@@ -58,17 +58,19 @@ function checkout_cvs_file($repos,$file) {
        }
        $actual_dir = getcwd();
        $tempdirname = tempnam("/tmp","cvstracker");
-       if (!$tempdirname)
+       if (!$tempdirname) {
                return false;
-       if (!unlink($tempdirname))
+       }
+       if (!unlink($tempdirname)) {
                return false;
-
+       }
        // Create the temporary directory and returns its name.
-       if (!mkdir($tempdirname))
+       if (!mkdir($tempdirname)) {
                return false;
-
-       if (!chdir($tempdirname))
+       }
+       if (!chdir($tempdirname)) {
                return false;
+       }
        system("cvs -d ".$repos." co ".$file);
 
        chdir($actual_dir);
@@ -135,7 +137,7 @@ function cvs_write_file($filePath, $content, $append=1) {
 }
 
 /**
- *add_sync_mail write to /CVSROOT/loginfo 
unix_name-comm...@lists.gforge.company.com
+ *add_sync_mail write to /CVSROOT/loginfo 
unix_name-comm...@lists.fusionforge.company.com
  *
  *@param $unix_group_name Name Group
  *@return void
@@ -173,8 +175,6 @@ function add_sync_mail($unix_group_name) {
                }
                
commit_cvs_file($cvsdir_prefix."/".$unix_group_name,$loginfo_file);
                release_cvs_file($loginfo_file);
-       } else {
-//             echo "Syncmail Found!\n";
        }
 }
 
@@ -214,8 +214,6 @@ function add_cvstracker($unix_group_name) {
                }
                
commit_cvs_file($cvsdir_prefix."/".$unix_group_name,$loginfo_file);
                release_cvs_file($loginfo_file);
-       } else {
-//             echo "cvstracker Found!\n";
        }
 
        // now make sure that if cvs version is 1.12, 
"UseNewInfoFmtStrings=yes" line
@@ -271,13 +269,9 @@ function add_acl_check($unix_group_name) {
                                "\n#END adding cvs acl check\n";
                }
 
-
-
                cvs_write_file($commitinfofile, $aclcheck, 1);
                
commit_cvs_file($cvsdir_prefix."/".$unix_group_name,$commitinfofile);
                release_cvs_file($commitinfofile);
-       } else {
-//             echo "cvstracker Found!\n";
        }
 }
 
@@ -286,38 +280,34 @@ function update_cvs_repositories() {
        global $err;
 
        //
-        // Move CVS trees for deleted groups
-        //
-        $res8 = db_query_params ('SELECT unix_group_name FROM deleted_groups 
WHERE isdeleted = 0;',
+       // Move CVS trees for deleted groups
+       //
+       $res8 = db_query_params ('SELECT unix_group_name FROM deleted_groups 
WHERE isdeleted = 0;',
                        array());
-        $err .= db_error();
-        $rows    = db_numrows($res8);
-        for($k = 0; $k < $rows; $k++) {
-                $deleted_group_name = db_result($res8,$k,'unix_group_name');
+       $err .= db_error();
+       $rows = db_numrows($res8);
+       for($k = 0; $k < $rows; $k++) {
+               $deleted_group_name = db_result($res8,$k,'unix_group_name');
 
-                if(!is_dir($cvsdir_prefix."/.deleted"))
-                        system("mkdir ".$cvsdir_prefix."/.deleted");
+               if (!is_dir($cvsdir_prefix."/.deleted")) {
+                       system("mkdir ".$cvsdir_prefix."/.deleted");
+               }
 
-                system("tar czfC 
$cvsdir_prefix/.deleted/$deleted_group_name.tar.gz $cvsdir_prefix 
$deleted_group_name");
-                system("chmod o-rwx 
$cvsdir_prefix/.deleted/$deleted_group_name.tar.gz");
-                system("rm -rf $cvsdir_prefix/$deleted_group_name");
+               system("tar czfC 
$cvsdir_prefix/.deleted/$deleted_group_name.tar.gz $cvsdir_prefix 
$deleted_group_name");
+               system("chmod o-rwx 
$cvsdir_prefix/.deleted/$deleted_group_name.tar.gz");
+               system("rm -rf $cvsdir_prefix/$deleted_group_name");
 
-                $res9 = db_query_params ('UPDATE deleted_groups set isdeleted 
= 1 WHERE unix_group_name = $1',
+               db_query_params ('UPDATE deleted_groups set isdeleted = 1 WHERE 
unix_group_name = $1',
                        array ($deleted_group_name));
-                $err .= db_error();
-        }
-
+               $err .= db_error();
+       }
 }
 
 
 
 /*
-
-
-       Loop through and create/update each repository for every project
-       that uses SCMCVS plugin
-
-
+ Loop through and create/update each repository for every project
+ that uses SCMCVS plugin
 */
 $err = "";
 
diff --git a/src/plugins/scmdarcs/common/DarcsPlugin.class.php 
b/src/plugins/scmdarcs/common/DarcsPlugin.class.php
index 567c748..7c336e1 100644
--- a/src/plugins/scmdarcs/common/DarcsPlugin.class.php
+++ b/src/plugins/scmdarcs/common/DarcsPlugin.class.php
@@ -436,10 +436,8 @@ over it to the project's administrator.");
 
                $updates = 0;
                $adds = 0;
-               $deletes = 0;
                $usr_adds = array();
                $usr_updates = array();
-               $usr_deletes = array();
 
                $toprepo = $this->getRootRepositories($group);
                $repo = $toprepo . '/' . $project_reponame;
diff --git a/src/plugins/scmgit/common/GitPlugin.class.php 
b/src/plugins/scmgit/common/GitPlugin.class.php
index b24fbe5..683e3d8 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -284,7 +284,6 @@ control over it to the project's administrator.");
                        return;
                }
                global $HTML;
-               $useautoheight = 0;
                $project = $this->checkParams($params);
                if (!$project) {
                        return;
@@ -688,10 +687,7 @@ control over it to the project's administrator.");
                        $year = $params['year'];
                        $month = $params['month'];
                        $day = $params['day'];
-                       $month_string = sprintf("%04d%02d", $year, $month);
                        $start_time = gmmktime(0, 0, 0, $month, $day, $year);
-                       $end_time = $start_time + 86400;
-
                        $repolist = $this->getRepositories($project);
                        foreach ($repolist as $repo_name) {
                                $this->gatherStatsRepo($project, $repo_name, 
$year, $month, $day);
@@ -1193,7 +1189,7 @@ control over it to the project's administrator.");
                                                                        
count($existing_repos)), $project_name));
                        $titleArr = array(_('Repository name'), ('Initial 
repository description'), _('Initial clone URL (if any)'), _('Delete'));
                        echo $HTML->listTableTop($titleArr);
-                       foreach ($existing_repos as $key => $repo) {
+                       foreach ($existing_repos as $repo) {
                                $cells = array();
                                $cells[][] = html_e('kbd', array(), 
$repo['repo_name']);
                                $cells[][] = $repo['description'];
diff --git a/src/plugins/scmhg/common/HgPlugin.class.php 
b/src/plugins/scmhg/common/HgPlugin.class.php
index e66d418..7aa65b1 100644
--- a/src/plugins/scmhg/common/HgPlugin.class.php
+++ b/src/plugins/scmhg/common/HgPlugin.class.php
@@ -434,7 +434,6 @@ Offer DAV or SSH access.");
                                $prevp = false;
                                $prevr = false;
                                $users = $project->getMembers();
-                               $pname = $project->getUnixName();
                                foreach ($users as $user) {
                                        if (forge_check_perm_for_user($user, 
'scm', $project->getID(), 'write')) {
                                                if ($prevp){
@@ -581,10 +580,7 @@ Offer DAV or SSH access.");
                        $year = $params['year'];
                        $month = $params['month'];
                        $day = $params['day'];
-                       $month_string = sprintf("%04d%02d", $year, $month);
                        $start_time = gmmktime(0, 0, 0, $month, $day, $year);
-                       $end_time = $start_time + 86400;
-
                        $repolist = $this->getRepositories($project);
                        foreach ($repolist as $repo_name) {
                                $this->gatherStatsRepo($project, $repo_name, 
$year, $month, $day);
@@ -910,7 +906,7 @@ Offer DAV or SSH access.");
                                                                        
count($existing_repos)), $project_name));
                        $titleArr = array(_('Repository name'), ('Initial 
repository description'), _('Delete'));
                        echo $HTML->listTableTop($titleArr);
-                       foreach ($existing_repos as $key => $repo) {
+                       foreach ($existing_repos as $repo) {
                                $cells = array();
                                $cells[][] = html_e('kbd', array(), 
$repo['repo_name']);
                                $cells[][] = $repo['description'];
diff --git a/src/plugins/scmhook/common/scmhookPlugin.class.php 
b/src/plugins/scmhook/common/scmhookPlugin.class.php
index 0472a03..70926a3 100644
--- a/src/plugins/scmhook/common/scmhookPlugin.class.php
+++ b/src/plugins/scmhook/common/scmhookPlugin.class.php
@@ -96,11 +96,11 @@ project independently.");
                $repository_name = $params['repository_name'];
                $scm_plugin = $params['scm_plugin'];
 
-                $group = group_get_object($group_id);
-                if (!$group->usesPlugin($this->name))
-                    return;
+               $group = group_get_object($group_id);
+               if (!$group->usesPlugin($this->name)) {
+                       return;
+               }
 
-               $hooksString = '';
                $hooks = $this->getAvailableHooks($group_id);
                $available_hooknames = array();
                foreach ($hooks as $hook) {
@@ -141,7 +141,7 @@ project independently.");
                                $sql_cols = array_keys($hook_params);
                                $sql_vals = array();
                                $sql_vars = array();
-                               foreach($hook_params as $pname => $pconf) {
+                               foreach($hook_params as $pconf) {
                                        $vals = $params['hooks']['options'];
                                        foreach ($vals as $val) {
                                                // Validation
@@ -279,7 +279,7 @@ project independently.");
        function artifact_extra_detail(&$params) {
                $hooksAvailable = $this->getAvailableHooks($params['group_id']);
                $hooksEnabled = $this->getEnabledHooks($params['group_id']);
-               foreach ($hooksEnabled as $key => $repos) {
+               foreach ($hooksEnabled as $repos) {
                        foreach ($repos as $repo) {
                                foreach ($hooksAvailable as $hookAvailable) {
                                        if 
(in_array($hookAvailable->getClassname(), $repo)) {
@@ -295,7 +295,7 @@ project independently.");
        function task_extra_detail($params) {
                $hooksAvailable = $this->getAvailableHooks($params['group_id']);
                $hooksEnabled = $this->getEnabledHooks($params['group_id']);
-               foreach ($hooksEnabled as $key => $repos) {
+               foreach ($hooksEnabled as $repos) {
                        foreach ($repos as $repo) {
                                foreach ($hooksAvailable as $hookAvailable) {
                                        if 
(in_array($hookAvailable->getClassname(), $repo)) {
diff --git a/src/plugins/scmhook/cronjobs/updateScmRepo.php 
b/src/plugins/scmhook/cronjobs/updateScmRepo.php
index bbaf51d..ce62364 100755
--- a/src/plugins/scmhook/cronjobs/updateScmRepo.php
+++ b/src/plugins/scmhook/cronjobs/updateScmRepo.php
@@ -71,7 +71,6 @@ function install_hooks($params) {
        while ($row = db_fetch_array($res)) {
                $group_id = $row['group_id'];
                $group = group_get_object($group_id);
-               $scm_box = $row['scm_box'];
                $returnvalue = true;
                // call the right cronjob in the library
                $scmtype = $row['scm_plugin'];
@@ -156,8 +155,3 @@ function install_hooks($params) {
 }
 
 cron_debug("INFO end of updateScmRepo main cronjob");
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
diff --git a/src/plugins/scmhook/library/scmhg/commitEmail.class.php 
b/src/plugins/scmhook/library/scmhg/commitEmail.class.php
index d42f432..4bc9e76 100644
--- a/src/plugins/scmhook/library/scmhg/commitEmail.class.php
+++ b/src/plugins/scmhook/library/scmhg/commitEmail.class.php
@@ -195,7 +195,6 @@ class HgCommitEmail extends scmhook {
                $unix_group = forge_get_config('apache_group');
                $unix_user = forge_get_config('apache_user');
 
-               $project_name = $project->getUnixName();
                $main_repo = $scmdir_root.'/.hg';
                if (is_dir($main_repo)) {
                        $push = "";
@@ -203,13 +202,12 @@ class HgCommitEmail extends scmhook {
                        $prevp = false;
                        $prevr = false;
                        $users = $project->getMembers();
-                       $pname = $project->getUnixName();
                        foreach ($users as $user) {
                                if (forge_check_perm_for_user($user, 'scm', 
$project->getID(), 'write')) {
-                                       if ($prevp){
+                                       if ($prevp) {
                                                $push .= ", ";
                                        }
-                                       if ($prevr){
+                                       if ($prevr) {
                                                $read .= ", ";
                                        }
                                        $push .= $user->getUnixName();
@@ -217,7 +215,7 @@ class HgCommitEmail extends scmhook {
                                        $prevp = true;
                                        $prevr = true;
                                } elseif (forge_check_perm_for_user($user, 
'scm', $project->getID(), 'read')) {
-                                       if ($prevr){
+                                       if ($prevr) {
                                                $read .= ", ";
                                        }
                                        $read .= $user->getUnixName();
diff --git a/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php 
b/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
index 9670b26..0c15d06 100644
--- a/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
+++ b/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
@@ -40,7 +40,6 @@ class ScmHgUpdateScmRepo {
                $group = group_get_object($group_id);
                $scmhookPlugin = new scmhookPlugin;
                $hooksAvailable = $scmhookPlugin->getAvailableHooks($group_id);
-               $unixname = $group->getUnixName();
                if (is_dir($scmdir_root)) {
                        $hooksServePushPullBundle = array();
                        foreach ($hooksAvailable as $hook) {

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

Summary of changes:
 src/common/include/Group.class.php                 |  2 +-
 src/common/include/Plugin.class.php                |  4 --
 src/common/include/config.php                      | 26 ++++---
 .../widget/Widget_MyMonitoredDocuments.class.php   |  3 +-
 src/common/widget/Widget_MySurveys.class.php       | 11 +--
 .../mantisbt_Widget_ProjectLastIssues.class.php    |  1 -
 .../mediawiki/common/mediawikiPlugin.class.php     |  1 -
 src/plugins/scmbzr/common/BzrPlugin.class.php      | 79 +++++++++++-----------
 src/plugins/scmccase/common/CCasePlugin.class.php  |  2 -
 src/plugins/scmcvs/cronjobs/cvs.php                | 66 ++++++++----------
 src/plugins/scmdarcs/common/DarcsPlugin.class.php  |  2 -
 src/plugins/scmgit/common/GitPlugin.class.php      |  6 +-
 src/plugins/scmhg/common/HgPlugin.class.php        |  6 +-
 src/plugins/scmhook/common/scmhookPlugin.class.php | 14 ++--
 src/plugins/scmhook/cronjobs/updateScmRepo.php     |  6 --
 .../scmhook/library/scmhg/commitEmail.class.php    |  8 +--
 .../library/scmhg/cronjobs/updateScmRepo.php       |  1 -
 17 files changed, 99 insertions(+), 139 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
Fusionforge-commits@lists.fusionforge.org
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to