[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1625-g6bdad08

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Apr 9 19:08:45 CEST 2017


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  6bdad08ab7e60f289e585e153c3dc6ff6bd7920d (commit)
       via  4997ec6652c90820de93651bf2be1bc1e32abc55 (commit)
      from  f748fcc23f695f22d312b7f56db398570f58e6d8 (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=6bdad08ab7e60f289e585e153c3dc6ff6bd7920d

commit 6bdad08ab7e60f289e585e153c3dc6ff6bd7920d
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Apr 9 19:07:44 2017 +0200

    forge cli: import document, support URL type + doc versions

diff --git a/src/bin/forge b/src/bin/forge
index 2c5a0ef..0f52906 100755
--- a/src/bin/forge
+++ b/src/bin/forge
@@ -361,6 +361,9 @@ class CliActions {
 					} else {
 						$filedatatype = 'application/binary';
 					}
+				} else {
+					$filedatatype = $version['filetype'];
+					$filedataname = '';
 				}
 				$doc_group_id = $stream['document']['data_array']['doc_group'];
 				$doc_group = documentgroup_get_object_byid($doc_group_id);
@@ -368,20 +371,23 @@ class CliActions {
 					echo _('Invalid document group (folder)')._(': ').$doc_group_id."\n";
 					return false;
 				}
+				$importData['user'] = $version['created_by'];
+				$importData['nopermcheck'] = true;
+				$importData['nonotice'] = true;
+				$importData['time'] = $version['createdate'];
 				if ($firstversion == true) {
 					$d = new Document($group);
-					$importData['user'] = $version['created_by'];
-					$importData['nopermcheck'] = true;
-					$importData['nonotice'] = true;
-					$importData['time'] = $version['createdate'];
-					if (!$d->create($version['filename'], $filedatatype, $filedataname, $doc_group_id, $version['title'], $version['description'], $stream['document']['data_array']['stateid'], $version['vcomment'])) {
+					if (!$d->create($version['filename'], $filedatatype, $filedataname, $doc_group_id, $version['title'], $version['description'], $stream['document']['data_array']['stateid'], $version['vcomment'], $importData)) {
 						echo $d->getErrorMessage()."\n";
 						return false;
 					} else {
 						$firstversion = false;
 					}
 				} else {
-					//add other versions
+					if (!$d->update($version['filename'], $filedatatype, $filedataname, $doc_group_id, $version['title'], $version['description'], $stream['document']['data_array']['stateid'], 0, 0, 1, $importData, $version['vcomment'])) {
+						echo $d->getErrorMessage()."\n";
+						return false;
+					}
 				}
 				//set default versions
 				//add reviews

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

commit 4997ec6652c90820de93651bf2be1bc1e32abc55
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Apr 9 19:07:09 2017 +0200

    var is array not null

diff --git a/src/common/docman/actions/editfile.php b/src/common/docman/actions/editfile.php
index 3cc55d2..80e8e11 100644
--- a/src/common/docman/actions/editfile.php
+++ b/src/common/docman/actions/editfile.php
@@ -169,7 +169,7 @@ switch ($subaction) {
 			session_redirect($urlparam);
 		}
 
-		if (!$d->update($filename, $filetype, $data, $doc_group, $title, $description, $stateid, $version, $current_version, $new_version, null, $vcomment)) {
+		if (!$d->update($filename, $filetype, $data, $doc_group, $title, $description, $stateid, $version, $current_version, $new_version, array(), $vcomment)) {
 			$error_msg = $d->getErrorMessage();
 		} else {
 			$feedback = sprintf(_('Document [D%s] updated successfully.'), $d->getID());

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

Summary of changes:
 src/bin/forge                          | 18 ++++++++++++------
 src/common/docman/actions/editfile.php |  2 +-
 2 files changed, 13 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list