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  4b8d5d621144d60c59beaa701bc3e7626b40d76a (commit)
      from  56efd07dd32b168027d25d09b5a3565ddf506358 (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=4b8d5d621144d60c59beaa701bc3e7626b40d76a

commit 4b8d5d621144d60c59beaa701bc3e7626b40d76a
Author: Franck Villaume <[email protected]>
Date:   Mon Apr 17 19:13:50 2017 +0200

    forge cli: start docgroupImport support

diff --git a/src/bin/forge b/src/bin/forge
index daa2adb..76f46d7 100755
--- a/src/bin/forge
+++ b/src/bin/forge
@@ -450,6 +450,8 @@ class CliActions {
                if ($docgroup && is_object($docgroup) && !$docgroup->isError()) 
{
                        $dm = new DocumentManager($docgroup->getGroup());
                        if ($dm && is_object($dm) && !$dm->isError()) {
+                               $docgroupDump = (array)$docgroup;
+                               unset($docgroupDump['Group']);
                                $docgroupDump['subdocgroups'] = 
$dm->getTree($docgroup_id);
                                $df = new 
DocumentFactory($docgroup->getGroup());
                                $df->setDocGroupID($docgroup_id);
@@ -467,6 +469,21 @@ class CliActions {
                return $docgroupDump;
        }
 
+       function docgroupImport() {
+               $stream = $this->loadFile($file, $format);
+               if (!$stream) {
+                       return false;
+               }
+               $group_id = $stream['document']['data_array']['group_id'];
+               $group = group_get_object($group_id);
+               $importSerialIdRef = array();
+               if ($group && is_object($group) && !$group->isError() && 
$group->usesDocman()) {
+                       //TODO: do it!
+               } else {
+                       echo _('Unable to get project to inject document 
group')._(': ').$group_id."\n";
+               }
+       }
+
        function docmanDump($group_id, $format = 'json') {
                $docmanDump = array();
                $group = group_get_object($group_id);

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

Summary of changes:
 src/bin/forge | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to