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  2eee8b663e674076457fd171f3e68c691880df46 (commit)
      from  d0ed1020d3e963aa44d928ed51cbaa2562eb42cf (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=2eee8b663e674076457fd171f3e68c691880df46

commit 2eee8b663e674076457fd171f3e68c691880df46
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Wed May 12 19:31:56 2021 +0200

    clean-up: use curly braces

diff --git a/src/common/include/minijson.php b/src/common/include/minijson.php
index f946491..8c8a11c 100644
--- a/src/common/include/minijson.php
+++ b/src/common/include/minijson.php
@@ -157,12 +157,14 @@ function minijson_encode_ob_string($x, $truncsz=0, 
$leader='"') {
                if ($Sp + $Ss > $Sx) {
                        break;
                }
-               while ($Ss--)
+               while ($Ss--) {
                        if (($c = ord(($ch = $x[$Sp++])) ^ 0x80) <= 0x3F) {
                                $wc |= $c << (6 * $Ss);
                                $u .= $ch;
-                       } else
+                       } else {
                                break 2;
+                       }
+               }
                /* complete wide character */
                if ($wc < $wmin) {
                        break;
@@ -197,7 +199,8 @@ function minijson_encode_ob_string($x, $truncsz=0, 
$leader='"') {
                                echo "\\";
                        }
                        echo $ch;
-               } else switch ($c) {
+               } else {
+                       switch ($c) {
                        case 0x08:
                                echo '\b';
                                break;
@@ -216,6 +219,7 @@ function minijson_encode_ob_string($x, $truncsz=0, 
$leader='"') {
                        default:
                                printf('\u%04X', $c);
                                break;
+                       }
                }
        }
        echo '"';
@@ -334,12 +338,13 @@ function minijson_encode_ob($x, $ri, $depth, $truncsz, 
$dumprsrc) {
                        $x = strval($x);
                        $rsrctype = 'resource('/*)*/ . $rs . ($rsrctype ?
                            (/*(*/')<' . $rsrctype . '>') : /*(*/'?)');
-                       if ($x === ('Resource id #' . $rs))
+                       if ($x === ('Resource id #' . $rs)) {
                                $x = $rsrctype . ';';
-                       elseif (strncmp($x, 'Resource ', 9) === 0)
+                       } elseif (strncmp($x, 'Resource ', 9) === 0) {
                                $x = $rsrctype . substr($x, 8);
-                       else
+                       } else {
                                $x = $rsrctype . '{' . $x . '}';
+                       }
                        minijson_encode_ob_string($x, $truncsz, '"\u0000');
                        return;
                }
diff --git a/src/db/20140406-convert-deb-plugin-upgrade.php 
b/src/db/20140406-convert-deb-plugin-upgrade.php
index 3be0272..7c10fa2 100644
--- a/src/db/20140406-convert-deb-plugin-upgrade.php
+++ b/src/db/20140406-convert-deb-plugin-upgrade.php
@@ -35,12 +35,15 @@ if (db_check_table_exists('plugin_scmgit_meta_data')) {
        $res = db_query_params("SELECT value FROM plugin_scmgit_meta_data WHERE 
key=$1", array('db-version'));
        $version = db_result($res, 0, 'value');
        print "  Converting scmgit, db version $version\n";
-       if (is_less_than($version, '0.2'))
+       if (is_less_than($version, '0.2')) {
                db_query_params("INSERT INTO database_changes VALUES 
('scmgit:20121019-multiple-repos.sql')", array());
-       if (is_less_than($version, '0.2.1'))
+       }
+       if (is_less_than($version, '0.2.1')) {
                db_query_params("INSERT INTO database_changes VALUES 
('scmgit:20121123-use-shared-table.sql')", array());
-       if (is_less_than($version, '0.3'))
+       }
+       if (is_less_than($version, '0.3')) {
                db_query_params("INSERT INTO database_changes VALUES 
('scmgit:20121128-drop-old-tables.sql')", array());
+       }
 }
 
 // Convert scmhook
@@ -48,8 +51,9 @@ if (db_check_table_exists('plugin_scmhook_meta_data')) {
        $res = db_query_params("SELECT value FROM plugin_scmhook_meta_data 
WHERE key=$1", array('db-version'));
        $version = db_result($res, 0, 'value');
        print "  Converting scmhook, db version $version\n";
-       if (is_less_than($version, '0.2'))
+       if (is_less_than($version, '0.2')) {
                db_query_params("INSERT INTO database_changes VALUES 
('scmhook:20130702-create_scmhook_git_committracker.sql')", array());
+       }
 }
 
 // Convert headermenu
@@ -57,8 +61,9 @@ if (db_check_table_exists('plugin_headermenu_meta_data')) {
        print "  Converting headermenu, db version 0.1\n";
        foreach(array('headermenu:20120930-addoutermenusupport.sql',
                 'headermenu:20121231-reorderentry.sql',
-                'headermenu:20130120-addprojectcolumn.sql') as $filename)
+                'headermenu:20130120-addprojectcolumn.sql') as $filename) {
                db_query_params("INSERT INTO database_changes VALUES ($1)", 
array($filename));
+       }
 }
 
 // Plugins 'block', 'cvstracker' and 'wiki' also have db upgrades, but
diff --git a/src/db/20150404-scmperms.php b/src/db/20150404-scmperms.php
index 96b9698..5b797c8 100644
--- a/src/db/20150404-scmperms.php
+++ b/src/db/20150404-scmperms.php
@@ -37,16 +37,18 @@ $res = db_query_params("SELECT name, group_id, gid, 
perm_val AS anon FROM nss_gr
                        ORDER BY name", array(1, 'scm', 20000));
 
 // Store everything in RAM to avoid a 3h-long SQL connection
-while ($row = db_fetch_array($res))
+while ($row = db_fetch_array($res)) {
     $groups[] = $row;
-
+}
 $svnroot = forge_get_config('repos_path', 'scmsvn');
 $gitroot = forge_get_config('repos_path', 'scmgit');
 foreach ($groups as $group) {
        $gname = $group['name'];
        $gid_ro = $group['group_id'] + $SYS->GID_ADD_SCMRO;
        $gid_rw = $group['group_id'] + $SYS->GID_ADD_SCMRW;
-       if ($verbose) print "$gname\n";
+       if ($verbose) {
+               print "$gname\n";
+       }
 
        $repo = "$svnroot/$gname";
        if (is_dir($repo)) {
diff --git a/src/plugins/blocks/www/index.php b/src/plugins/blocks/www/index.php
index 21e4077..4f3afcd 100644
--- a/src/plugins/blocks/www/index.php
+++ b/src/plugins/blocks/www/index.php
@@ -239,9 +239,9 @@ if ($type == 'admin') {
 
        foreach ($blocks as $b => $help) {
 
-               if (!$activate[$b])
+               if (!$activate[$b]) {
                        $activate[$b] = 0;
-
+               }
                if ((!isset($status[$b]) && $activate[$b]) ||
                                (isset($status[$b]) && $activate[$b] !== 
$status[$b]))
                        // Must be updated.

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

Summary of changes:
 src/common/include/minijson.php                | 17 +++++++++++------
 src/db/20140406-convert-deb-plugin-upgrade.php | 15 ++++++++++-----
 src/db/20150404-scmperms.php                   |  8 +++++---
 src/plugins/blocks/www/index.php               |  4 ++--
 4 files changed, 28 insertions(+), 16 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