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 297dade94dc312c5791f10cab1b34b96caad54e0 (commit)
from 07f53536ccc21129e12af46eda9e5ed87f15f250 (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=297dade94dc312c5791f10cab1b34b96caad54e0
commit 297dade94dc312c5791f10cab1b34b96caad54e0
Author: Franck Villaume <[email protected]>
Date: Mon Dec 19 11:33:50 2016 +0100
fix PHP syntax, fix documentversion cache
diff --git a/src/common/docman/DocumentVersion.class.php
b/src/common/docman/DocumentVersion.class.php
index 076b39f..d0840ea 100644
--- a/src/common/docman/DocumentVersion.class.php
+++ b/src/common/docman/DocumentVersion.class.php
@@ -24,9 +24,11 @@
require_once $gfcommon.'include/FFError.class.php';
require_once $gfcommon.'docman/DocumentStorage.class.php';
+$DOCUMENTVERSION_OBJ = array();
+
function &documentversion_get_object($ver_id, $docid, $group_id, $res = false)
{
global $DOCUMENTVERSION_OBJ;
- if (!isset($DOCUMENTVERSION_OBJ['_'.$ver_id.'_'])) {
+ if (!isset($DOCUMENTVERSION_OBJ['_'.$ver_id.'-'.$docid.'_'])) {
if ($res) {
//the db result handle was passed in
} else {
@@ -35,12 +37,12 @@ function &documentversion_get_object($ver_id, $docid,
$group_id, $res = false) {
array($ver_id, $docid));
}
if (!$res || db_numrows($res) < 1) {
- $DOCUMENTVERSION_OBJ['_'.$ver_id.'_'] = false;
+ $DOCUMENTVERSION_OBJ['_'.$ver_id.'-'.$docid.'_'] =
false;
} else {
- $DOCUMENTVERSION_OBJ['_'.$ver_id.'_'] = new
DocumentVersion(document_get_object($docid, $group_id), $ver_id,
db_fetch_array($res));
+ $DOCUMENTVERSION_OBJ['_'.$ver_id.'-'.$docid.'_'] = new
DocumentVersion(document_get_object($docid, $group_id), $ver_id,
db_fetch_array($res));
}
}
- return $DOCUMENTVERSION_OBJ['_'.$ver_id.'_'];
+ return $DOCUMENTVERSION_OBJ['_'.$ver_id.'-'.$docid.'_'];
}
function &documentversion_get_object_by_serialid($serial_id, $docid,
$group_id, $res = false) {
diff --git a/src/common/docman/actions/getdocreviewcomments.php
b/src/common/docman/actions/getdocreviewcomments.php
index 2c025c6..6d3cd8a 100644
--- a/src/common/docman/actions/getdocreviewcomments.php
+++ b/src/common/docman/actions/getdocreviewcomments.php
@@ -41,7 +41,7 @@ if ($docid && $revid) {
if ($documentObject && !$documentObject->isError()) {
$dr = new DocumentReview($documentObject, $revid);
if ($dr && !$dr->isError()) {
- $result['html'] .=
$dr->showCommentFormHTML().$dr->showCommentsHTML();
+ $result['html'] =
$dr->showCommentFormHTML().$dr->showCommentsHTML();
} else {
$result['html'] = $HTML->warning_msg(_('Cannot retrieve
review')._(': ').$revid);
}
diff --git a/src/common/docman/actions/getdocreviewcompleteform.php
b/src/common/docman/actions/getdocreviewcompleteform.php
index e058693..81341c5 100644
--- a/src/common/docman/actions/getdocreviewcompleteform.php
+++ b/src/common/docman/actions/getdocreviewcompleteform.php
@@ -42,7 +42,7 @@ if ($docid && $revid) {
if ($documentObject && !$documentObject->isError()) {
$dr = new DocumentReview($documentObject, $revid);
if ($dr && !$dr->isError()) {
- $result['html'] .= $dr->showCompleteFormHTML();
+ $result['html'] = $dr->showCompleteFormHTML();
} else {
$result['html'] = $HTML->warning_msg(_('Cannot retrieve
review')._(': ').$revid);
}
diff --git a/src/common/docman/actions/getdocreviews.php
b/src/common/docman/actions/getdocreviews.php
index 8286584..a2ae2cc 100644
--- a/src/common/docman/actions/getdocreviews.php
+++ b/src/common/docman/actions/getdocreviews.php
@@ -44,7 +44,7 @@ if ($docid) {
$dr = new DocumentReview($documentObject);
if ($drf && $dvf && $dr && !$drf->isError() && !$dvf->isError()
&& !$dr->isError()) {
$serialIDs = $dvf->getSerialIDs();
- $result['html'] .= $drf->getReviewsHTML($serialIDs);
+ $result['html'] = $drf->getReviewsHTML($serialIDs);
$result['html'] .= $dr->showCreateFormHTML();
$result['htmltab'] = _('Reviews').'
('.$drf->getReviewsCounter().')';
} else {
diff --git a/src/common/docman/actions/getdocreviewuserstatus.php
b/src/common/docman/actions/getdocreviewuserstatus.php
index 0c462a9..d6fdcf0 100644
--- a/src/common/docman/actions/getdocreviewuserstatus.php
+++ b/src/common/docman/actions/getdocreviewuserstatus.php
@@ -42,7 +42,7 @@ if ($docid && $revid) {
if ($documentObject && !$documentObject->isError()) {
$dr = new DocumentReview($documentObject, $revid);
if ($dr && !$dr->isError()) {
- $result['html'] .= $dr->showUsersStatusHTML();
+ $result['html'] = $dr->showUsersStatusHTML();
} else {
$result['html'] = $HTML->warning_msg(_('Cannot retrieve
review')._(': ').$revid);
}
-----------------------------------------------------------------------
Summary of changes:
src/common/docman/DocumentVersion.class.php | 10 ++++++----
src/common/docman/actions/getdocreviewcomments.php | 2 +-
src/common/docman/actions/getdocreviewcompleteform.php | 2 +-
src/common/docman/actions/getdocreviews.php | 2 +-
src/common/docman/actions/getdocreviewuserstatus.php | 2 +-
5 files changed, 10 insertions(+), 8 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits