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  566d12342c962c197bcf3bfe8820876e864d6338 (commit)
       via  32aa24cc4c3e9a94e5223d07419fe54aeb7ac0da (commit)
       via  fa9098b54712356b5bbaaee924f0d7dbadcdaf55 (commit)
      from  b47dd89af105a6d650f495418060d7e892df772b (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=566d12342c962c197bcf3bfe8820876e864d6338

commit 566d12342c962c197bcf3bfe8820876e864d6338
Author: Franck Villaume <[email protected]>
Date:   Sat Mar 18 18:32:30 2017 +0100

    forge cli: start implement forumDump

diff --git a/src/bin/forge b/src/bin/forge
index 1ba2246..b71bede 100755
--- a/src/bin/forge
+++ b/src/bin/forge
@@ -32,6 +32,11 @@ require_once 
$gfcommon.'docman/DocumentReviewFactory.class.php';
 class CliActions {
        function help($method = null) {
                $methods = join('|', get_class_methods($this));
+               $dumpFormatInfo = "the following output formats are 
available:\n".
+                                 " - json:\n".
+                                 "   pretty json formated string output\n".
+                                 " - raw: (default)\n".
+                                 "   standard PHP array print_r format\n";
                switch ($method) {
                        case 'help':
                                echo "Use: .../forge help ($methods)\n";
@@ -48,66 +53,37 @@ class CliActions {
                        case 'artifactDump':
                                echo "Use: .../forge artifactDump <aid> 
[json|raw]\n";
                                echo "to dump an artifact from a specific 
tracker of a project.\n";
-                               echo "the following output formats are 
available:\n";
-                               echo " - json:\n";
-                               echo "   pretty json formated string output\n";
-                               echo " - raw: (default)\n";
-                               echo "   standard PHP array print_r format\n";
+                               echo $dumpFormatInfo;
                                break;
                        case 'trackerDump':
                                echo "Use: .../forge trackerDump <atid> 
[json|raw]\n";
                                echo "to dump a tracker from a specific 
project.\n";
-                               echo "the following output formats are 
available:\n";
-                               echo " - json:\n";
-                               echo "   pretty json formated string output\n";
-                               echo " - raw: (default)\n";
-                               echo "   standard PHP array print_r format\n";
+                               echo $dumpFormatInfo;
                                break;
                        case 'documentDump':
                                echo "Use: .../forge documentDump <docid> 
[json|raw]\n";
                                echo "to dump a document from a specific 
project.\n";
-                               echo "the following output formats are 
available:\n";
-                               echo " - json:\n";
-                               echo "   pretty json formated string output\n";
-                               echo " - raw: (default)\n";
-                               echo "   standard PHP array print_r format\n";
+                               echo $dumpFormatInfo;
                                break;
                        case 'docmanDump':
                                echo "Use: .../forge docmanDump <groupid> 
[json|raw]\n";
                                echo "to dump docman from a specific 
project.\n";
-                               echo "the following output formats are 
available:\n";
-                               echo " - json:\n";
-                               echo "   pretty json formated string output\n";
-                               echo " - raw: (default)\n";
-                               echo "   standard PHP array print_r format\n";
+                               echo $dumpFormatInfo;
                                break;
                        case 'packageDump':
                                echo "Use: .../forge packageDump <packageid> 
[json|raw]\n";
                                echo "to dump a spectific FRS package from a 
specific project.\n";
-                               echo "the following output formats are 
available:\n";
-                               echo " - json:\n";
-                               echo "   pretty json formated string output\n";
-                               echo " - raw: (default)\n";
-                               echo "   standard PHP array print_r format\n";
+                               echo $dumpFormatInfo;
                                break;
                        case 'frsDump':
                                echo "Use: .../forge frsDump <groupid> 
[json|raw]\n";
                                echo "to dump FRS from a specific project.\n";
-                               echo "the following functions are available:\n";
-                               echo "the following output formats are 
available:\n";
-                               echo " - json:\n";
-                               echo "   pretty json formated string output\n";
-                               echo " - raw: (default)\n";
-                               echo "   standard PHP array print_r format\n";
+                               echo $dumpFormatInfo;
                                break;
                        case 'groupDump':
                                echo "Use: .../forge groupDump <groupid> 
[json|raw]\n";
                                echo "to dump a group.\n";
-                               echo "the following output formats are 
available:\n";
-                               echo " - json:\n";
-                               echo "   pretty json formated string output\n";
-                               echo " - raw: (default)\n";
-                               echo "   standard PHP array print_r format\n";
+                               echo $dumpFormatInfo;
                        default:
                                echo "Usage: .../forge ($methods) 
[arguments...]\n" ;
                                echo "Get more info use: .../forge help help\n";
@@ -189,7 +165,11 @@ class CliActions {
                                }
                        }
                        if ($group->usesForum()) {
-                               $groupDump['forums'] = array();
+                               $ff = new ForumFactory($group);
+                               $ffid_arr = $ff->getAllForumIds();
+                               foreach ($ffid_arr as $ffid) {
+                                       $groupDump['forums'][] = 
$this->forumDump($ffid, 'return');
+                               }
                        }
                        if ($group->usesFRS()) {
                                $groupDump['frs'] = $this->frsDump($group_id, 
'return');
@@ -197,6 +177,7 @@ class CliActions {
                        if ($group->usesNews()) {
                                $groupDump['news'] = array();
                        }
+                       plugin_hook_by_reference('pluginDump', $groupDump);
                } else {
                        $groupDump['error'][] = _('Unable to get group 
id')._(': ').$group_id;
                }
@@ -204,6 +185,20 @@ class CliActions {
                $this->print_result($groupDump, $format);
        }
 
+       function forumDump($fid, $format = 'json') {
+               $forumDump['id'] = $fid;
+               $forum = forum_get_object($fid);
+               if ($forum && is_object($forum) && !$forum->isError()) {
+                       unset($forum->Group);
+                       $forumDump['setup'] = (array)$forum;
+               } else {
+                       $forumDump['error'][] = _('Unable to get forum 
id')._(': ').$fid;
+               }
+               ksort($forumDump);
+               $this->print_result($forumDump, $format);
+               return $forumDump;
+       }
+
        function trackerDump($atid, $format = 'json') {
                $trackerDump['id'] = $atid;
                $at = artifactType_get_object($atid);

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

commit 32aa24cc4c3e9a94e5223d07419fe54aeb7ac0da
Author: Franck Villaume <[email protected]>
Date:   Sat Mar 18 15:17:42 2017 +0100

    add storageref on artifact attachment to prepare data retrieval

diff --git a/src/bin/forge b/src/bin/forge
index a8a2a28..1ba2246 100755
--- a/src/bin/forge
+++ b/src/bin/forge
@@ -150,9 +150,10 @@ class CliActions {
                                }
                        }
                        $files = $artf->getFiles();
-                       foreach ($files as $file) {
+                       foreach ($files as $key => $file) {
                                unset($file->Artifact);
-                               $artifactDump['artifact']['files'][] = 
(array)$file;
+                               $artifactDump['artifact']['files'][$key] = 
(array)$file;
+                               
$artifactDump['artifact']['files'][$key]['storageref'] = $file->getFile();
                        }
                        $artifactDump['artifact']['relatedtasks'] = array();
                        $tasks = $artf->getRelatedTasks();

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

commit fa9098b54712356b5bbaaee924f0d7dbadcdaf55
Author: Franck Villaume <[email protected]>
Date:   Sat Mar 18 15:16:59 2017 +0100

    space

diff --git a/src/common/tracker/Artifact.class.php 
b/src/common/tracker/Artifact.class.php
index d0c70b6..7c50f04 100644
--- a/src/common/tracker/Artifact.class.php
+++ b/src/common/tracker/Artifact.class.php
@@ -751,10 +751,10 @@ class Artifact extends FFObject {
                        $rows=db_numrows($res);
                        if ($rows > 0) {
                                for ($i=0; $i < $rows; $i++) {
-                                       $this->files[$i]=new 
ArtifactFile($this,db_fetch_array($res));
+                                       $this->files[$i] = new 
ArtifactFile($this, db_fetch_array($res));
                                }
                        } else {
-                               $this->files=array();
+                               $this->files = array();
                        }
                }
                return $this->files;

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

Summary of changes:
 src/bin/forge                         | 74 +++++++++++++++++------------------
 src/common/tracker/Artifact.class.php |  4 +-
 2 files changed, 37 insertions(+), 41 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