[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1667-g56efd07
Franck Villaume
nerville at libremir.placard.fr.eu.org
Mon Apr 17 18:56:29 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 56efd07dd32b168027d25d09b5a3565ddf506358 (commit)
from adab26fa98c3a3444060ffa3743f75627ebfd38b (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=56efd07dd32b168027d25d09b5a3565ddf506358
commit 56efd07dd32b168027d25d09b5a3565ddf506358
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Mon Apr 17 18:56:14 2017 +0200
forge cli: documentImport support attachment to comment
diff --git a/src/bin/forge b/src/bin/forge
index 6a2bdb6..daa2adb 100755
--- a/src/bin/forge
+++ b/src/bin/forge
@@ -425,6 +425,14 @@ class CliActions {
echo $nc->getErrorMessage()."\n";
db_rollback();
return false;
+ } else {
+ if ($comment['attachment']['storageref'] != null) {
+ if (!$nc->attachFile($comment['attachment']['data_array']['filename'], $comment['attachment']['data_array']['filetype'], $comment['attachment']['data_array']['createdate'], $comment['attachment']['storageref'])) {
+ echo $nc->getErrorMessage()."\n";
+ db_rollback();
+ return false;
+ }
+ }
}
}
}
diff --git a/src/common/docman/DocumentReviewCommentFactory.class.php b/src/common/docman/DocumentReviewCommentFactory.class.php
index 597b9d8..cde7c3d 100644
--- a/src/common/docman/DocumentReviewCommentFactory.class.php
+++ b/src/common/docman/DocumentReviewCommentFactory.class.php
@@ -64,9 +64,10 @@ class DocumentReviewCommentFactory extends FFError {
$attachid = $commentsArr[$i]->getAttachmentID();
if ($attachid) {
$drca = new DocumentReviewCommentAttachment($attachid);
- $commentsArr[$i]->storageref = $drca->getFilePath();
+ $commentsArr[$i]->attachment = $drca;
+ $commentsArr[$i]->attachment->storageref = $drca->getFilePath();
} else {
- $commentsArr[$i]->storageref = null;
+ $commentsArr[$i]->attachment->storageref = null;
}
$i++;
}
-----------------------------------------------------------------------
Summary of changes:
src/bin/forge | 8 ++++++++
src/common/docman/DocumentReviewCommentFactory.class.php | 5 +++--
2 files changed, 11 insertions(+), 2 deletions(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list