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  d90d893eed2526e0f45db8dc1cff15e7b4f012ea (commit)
       via  e6f4354570664d1b5a20c1bc0f38f9936f521da8 (commit)
      from  606f0bda20b7199df212a266152f3c571714dcce (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=d90d893eed2526e0f45db8dc1cff15e7b4f012ea

commit d90d893eed2526e0f45db8dc1cff15e7b4f012ea
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Sat May 1 22:47:25 2021 +0200

    try to fix CreateDocURL test

diff --git a/src/common/docman/DocumentGroupFactory.class.php 
b/src/common/docman/DocumentGroupFactory.class.php
index e23c9b1..10c5c18 100644
--- a/src/common/docman/DocumentGroupFactory.class.php
+++ b/src/common/docman/DocumentGroupFactory.class.php
@@ -89,7 +89,11 @@ class DocumentGroupFactory extends FFError {
                }
 
                // Build the nested array
-               $count = count($this->flat_groups);
+               if (is_array($this->flat_groups)) {
+                       $count = count($this->flat_groups);
+               } else {
+                       $count = 0;
+               }
                for ($i=0; $i < $count; $i++) {
                        
$this->nested_groups[$this->flat_groups[$i]->getParentID()][] =& 
$this->flat_groups[$i];
                }
diff --git a/src/common/docman/DocumentManager.class.php 
b/src/common/docman/DocumentManager.class.php
index 65ec0f9..307caca 100644
--- a/src/common/docman/DocumentManager.class.php
+++ b/src/common/docman/DocumentManager.class.php
@@ -381,7 +381,7 @@ class DocumentManager extends FFError {
         * @param       int     $level          The current level
         * @param       bool    $display_files  Set filename instead of 
directory name.
         */
-       function buildArrays($group_arr, &$id_array, &$text_array, 
&$dont_display, $parent = 0, $level = 0, $display_files = false) {
+       function buildArrays($group_arr, &$id_array, &$text_array, 
$dont_display, $parent = 0, $level = 0, $display_files = false) {
                if (!is_array($group_arr) || !array_key_exists("$parent", 
$group_arr)) {
                        return;
                }

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

commit e6f4354570664d1b5a20c1bc0f38f9936f521da8
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Sat May 1 22:23:39 2021 +0200

    clean-up

diff --git a/src/common/forum/ForumAdmin.class.php 
b/src/common/forum/ForumAdmin.class.php
index ea65e86..75db876 100644
--- a/src/common/forum/ForumAdmin.class.php
+++ b/src/common/forum/ForumAdmin.class.php
@@ -368,7 +368,7 @@ class ForumAdmin extends FFError {
                                                }
                                                if (!db_query_params('DELETE 
FROM forum_pending_messages WHERE msg_id=$1',
                                                                        array 
($msgids[$i]))) {
-                                                       $error_msg .= "DB 
Error: ". db_error();
+                                                       $error_msg = "DB Error: 
". db_error();
                                                        db_rollback();
                                                        
ForumPendingStorage::instance()->rollback();
                                                        break;
@@ -383,13 +383,13 @@ class ForumAdmin extends FFError {
                                                $res1 = db_query_params 
('SELECT * FROM forum_pending_messages WHERE msg_id=$1',
                                                                        array 
($msgids[$i]));
                                                if (!$res1) {
-                                                       $error_msg .= "DB Error 
" . db_error() . "<br />";
+                                                       $error_msg = "DB Error 
" . db_error() . "<br />";
                                                        break;
                                                }
                                                $res2 = db_query_params 
('SELECT * FROM forum_pending_attachment WHERE msg_id=$1',
                                                                        array 
($msgids[$i]));
                                                if (!$res2) {
-                                                       $error_msg .= "DB Error 
" . db_error() . "<br />";
+                                                       $error_msg = "DB Error 
" . db_error() . "<br />";
                                                        break;
                                                }
                                                $f = new 
Forum($this->g,$forum_id);
@@ -469,13 +469,13 @@ class ForumAdmin extends FFError {
                                                        db_begin();
                                                        if (!db_query_params 
('DELETE FROM forum_pending_attachment WHERE msg_id=$1',
                                                                                
array ($msgids[$i]))) {
-                                                               $error_msg .= 
"DB Error: ". db_error();
+                                                               $error_msg = 
"DB Error: ". db_error();
                                                                db_rollback();
                                                                break;
                                                        }
                                                        if (!db_query_params 
('DELETE FROM forum_pending_messages WHERE msg_id=$1',
                                                                                
array ($msgids[$i]))) {
-                                                               $error_msg .= 
"DB Error: ". db_error();
+                                                               $error_msg = 
"DB Error: ". db_error();
                                                                db_rollback();
                                                                break;
                                                        }
diff --git a/src/common/include/MailParser.class.php 
b/src/common/include/MailParser.class.php
index 7ec2030..012a2ec 100644
--- a/src/common/include/MailParser.class.php
+++ b/src/common/include/MailParser.class.php
@@ -24,9 +24,9 @@ require_once $gfcommon.'include/FFError.class.php';
 
 class MailParser extends FFError {
 
-       var $max_file_size=2000000;
+       var $max_file_size = 2000000;
        var $headers;
-       var $body;
+       var $body = '';
 
        function __construct($input_file) {
                parent::__construct();
@@ -43,12 +43,10 @@ class MailParser extends FFError {
                $linecount=count($lines);
                unset($input_data);
 
-//system("echo \"mp: headers".implode("***\n",$lines)."\n\" >> 
/tmp/forum.log");
                //
                //      Read the message line-by-line
                //
                for ($i=0; $i<($linecount-1); $i++) {
-//system("echo \"mp: line $i of $linecount length: ".strlen($lines[$i])." 
".$lines[$i]."\n\" >> /tmp/forum.log");
                        //
                        //      Still reading headers
                        //
diff --git a/src/common/include/database-pgsql.php 
b/src/common/include/database-pgsql.php
index cb8e962..ac848c7 100644
--- a/src/common/include/database-pgsql.php
+++ b/src/common/include/database-pgsql.php
@@ -81,7 +81,6 @@ function db_connect() {
                if (!$gfconn) {
                        throw new DBException(forge_get_config('forge_name')
                                        ." Could Not Connect to Database: 
".db_error());
-                       exit(1);
                }
        } else {
                print("function pg_pconnect doesn't exist: no postgresql 
interface");
@@ -324,8 +323,7 @@ function db_prepare($qstring, $qname, $dbserver = NULL) {
                    db_error($dbserver) . "\n\n" . debug_string_backtrace());
        } elseif ($sysdebug_dberrors) {
                ffDebug("database", "db_prepare() failed (" .
-                   db_error($dbserver) . "), SQL: " . $qstring,
-                   print_r(array("params" => $params), 1));
+                   db_error($dbserver) . "), SQL: " . $qstring);
        } else {
                error_log('SQL: ' . preg_replace('/\n\t+/', ' ', $qstring));
                error_log('SQL> ' . db_error($dbserver));
@@ -374,17 +372,17 @@ function db_execute($qname, $params, $dbserver = NULL) {
 /**
  * db_unprepare - Deallocate a prepared SQL query
  *
- * @param      string  $name           the prepared query
+ * @param      string  $qname          the prepared query
  * @param      int     $dbserver       ability to spread load to multiple db 
servers.
  * @return     int     result set handle.
  */
-function db_unprepare($name, $dbserver = NULL) {
+function db_unprepare($qname, $dbserver = NULL) {
        global $sysdebug_dbquery, $sysdebug_dberrors;
 
        db_connect_if_needed();
        $dbconn = db_switcher($dbserver) ;
 
-       $res = @pg_query($dbconn, "DEALLOCATE $name");
+       $res = @pg_query($dbconn, "DEALLOCATE $qname");
        if ($res) {
                if ($sysdebug_dbquery) {
                        ffDebug("trace",
@@ -396,8 +394,7 @@ function db_unprepare($name, $dbserver = NULL) {
                    db_error($dbserver) . "\n\n" . debug_string_backtrace());
        } elseif ($sysdebug_dberrors) {
                ffDebug("database", "db_unprepare() failed (" .
-                   db_error($dbserver) . "), SQL: " . $qname,
-                   print_r(array("params" => $params), 1));
+                   db_error($dbserver) . "), SQL: " . $qname);
        } else {
                error_log('SQL: ' . preg_replace('/\n\t+/', ' ', $qname));
                error_log('SQL> ' . db_error($dbserver));
diff --git a/src/common/include/utils.php b/src/common/include/utils.php
index f055897..f6f3b80 100644
--- a/src/common/include/utils.php
+++ b/src/common/include/utils.php
@@ -665,10 +665,9 @@ function valid_hostname($hostname = "xyz") {
  * @param      int     $bytes  is the size
  * @param      bool    $base10 enable base 10 representation, otherwise 
default base 2  is used
  * @param      int     $round  number of fractional digits
- * @param      array   $labels strings associated to each 2^10 or 
10^3(base10==true) multiple of base units
  * @return     string
  */
-function human_readable_bytes($bytes, $base10 = false, $round = 0, $labels = 
array()) {
+function human_readable_bytes($bytes, $base10 = false, $round = 0) {
        if ($bytes == 0) {
                return "0";
        }

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

Summary of changes:
 src/common/docman/DocumentGroupFactory.class.php |  6 +++++-
 src/common/docman/DocumentManager.class.php      |  2 +-
 src/common/forum/ForumAdmin.class.php            | 10 +++++-----
 src/common/include/MailParser.class.php          |  6 ++----
 src/common/include/database-pgsql.php            | 13 +++++--------
 src/common/include/utils.php                     |  3 +--
 6 files changed, 19 insertions(+), 21 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