[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 958d3734e5565999b0031b2129d673ffbdd642ac

Franck Villaume nerville at fusionforge.org
Tue Jul 8 22:35:58 CEST 2014


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, Branch_5_3 has been updated
       via  958d3734e5565999b0031b2129d673ffbdd642ac (commit)
      from  b6ce575f8fd1b1c41b95c098938d49eb829225d7 (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 -----------------------------------------------------------------
commit 958d3734e5565999b0031b2129d673ffbdd642ac
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Jul 8 22:34:12 2014 +0200

    fix [#702]: docman views not incremented

diff --git a/src/CHANGES b/src/CHANGES
index 09e6a89..bc75493 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -8,6 +8,7 @@ Fusionforge-5.3.2:
 * News: don't send requests for frontpage display for private projects (Inria)
 * Plugin mediawiki: fix paths in import/export scripts (Inria)
 * Plugin fckeditor: dropped in favor of ckeditor
+* Docman: fix download count [#702] (TrivialDev)
 
 Fusionforge-5.3.1:
 * Docman: Basic Webdav write mkcol support (TrivialDev)
diff --git a/src/common/docman/Document.class.php b/src/common/docman/Document.class.php
index aa261b6..d3b9c95 100644
--- a/src/common/docman/Document.class.php
+++ b/src/common/docman/Document.class.php
@@ -1059,9 +1059,8 @@ class Document extends Error {
 	/**
 	 * downloadUp - insert download stats
 	 *
-	 * @access	private
 	 */
-	private function downloadUp() {
+	function downloadUp() {
 		if (session_loggedin()) {
 			$s =& session_get_user();
 			$us = $s->getID();
diff --git a/src/www/docman/view.php b/src/www/docman/view.php
index a900fa7..fe97def 100644
--- a/src/www/docman/view.php
+++ b/src/www/docman/view.php
@@ -92,8 +92,8 @@ if (is_numeric($docid)) {
 
 	$file_path = $d->getFilePath();
 	$length = filesize($file_path);
+	$d->downloadUp();
 	header("Content-length: $length");
-
 	readfile_chunked($file_path);
 
 } elseif ($docid === 'backup') {

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

Summary of changes:
 src/CHANGES                          |    1 +
 src/common/docman/Document.class.php |    3 +--
 src/www/docman/view.php              |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list