[Fusionforge-commits] FusionForge branch master updated. f93b4b4b0a106b22d1ff117accab832d63b57576

Franck Villaume nerville at fusionforge.org
Wed Dec 17 16:01:28 CET 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, master has been updated
       via  f93b4b4b0a106b22d1ff117accab832d63b57576 (commit)
      from  3b533460275afd79bc840ef5453a72239566bfb7 (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 f93b4b4b0a106b22d1ff117accab832d63b57576
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Dec 17 15:58:45 2014 +0100

    fix docman parser post new parser engine merge

diff --git a/src/common/docman/Parsedata.class.php b/src/common/docman/Parsedata.class.php
index 1c3f5f9..2fcbcc1 100644
--- a/src/common/docman/Parsedata.class.php
+++ b/src/common/docman/Parsedata.class.php
@@ -62,7 +62,7 @@ class Parsedata {
 		// always parse title, description, filename and filetype
 		$data1 = utf8_decode("$title $description $filename $filetype");
 		// temporary file for treatment
-		$filename = tempnam(forge_get_config('data_path'), 'tmp');
+		$filename = tempnam(sys_get_temp_dir(), 'docman');
 		$handle = fopen($filename, 'w');
 		fwrite($handle, $data1);
 		fclose($handle);
@@ -90,7 +90,7 @@ class Parsedata {
 			foreach ($arrayLines as $a) {
 				if (trim($a) != "" && substr($a, 0,1) != "#") {
 					$a2 = explode ("|", $a);
-					$rep[$a2[0]] = $a2[1];
+					$rep[$a2[0]] = trim($a2[1]);
 				}
 			}
 		}
diff --git a/src/common/docman/engine/parser_html.php b/src/common/docman/engine/parser_html.php
index 54024a0..c8546c2 100755
--- a/src/common/docman/engine/parser_html.php
+++ b/src/common/docman/engine/parser_html.php
@@ -44,7 +44,7 @@ $contents = fread($fd, filesize($fichin));
 fclose($fd);
 
 $strip_content = strip_tags($contents);
-$filename = tempnam(forge_get_config('data_path'), "tmp");
+$filename = tempnam(sys_get_temp_dir(), 'docman');
 $fd = fopen($filename, "w");
 fwrite($fd , $strip_content);
 fclose($fd);
diff --git a/src/common/docman/engine/parser_pdf.inc.php b/src/common/docman/engine/parser_pdf.inc.php
index bb9d0c0..b22fe13 100644
--- a/src/common/docman/engine/parser_pdf.inc.php
+++ b/src/common/docman/engine/parser_pdf.inc.php
@@ -1,4 +1,3 @@
-#! /usr/bin/php
 <?php
 /**
  * FusionForge document search engine
diff --git a/src/common/docman/engine/parser_pdf.php b/src/common/docman/engine/parser_pdf.php
index 896eb8d..0bcc568 100755
--- a/src/common/docman/engine/parser_pdf.php
+++ b/src/common/docman/engine/parser_pdf.php
@@ -1,4 +1,4 @@
-#! /usr/bin/php
+#!/usr/bin/php
 <?php
 /**
  * FusionForge document search engine
diff --git a/src/common/docman/engine/parser_text.php b/src/common/docman/engine/parser_text.php
index 4948062..ab2dcf0 100755
--- a/src/common/docman/engine/parser_text.php
+++ b/src/common/docman/engine/parser_text.php
@@ -1,4 +1,4 @@
-#! /usr/bin/php
+#!/usr/bin/php
 <?php
 /**
  * FusionForge document search engine
diff --git a/src/common/docman/engine/parser_unoconv_document.php b/src/common/docman/engine/parser_unoconv_document.php
index 802e453..cbe2458 100644
--- a/src/common/docman/engine/parser_unoconv_document.php
+++ b/src/common/docman/engine/parser_unoconv_document.php
@@ -1,4 +1,4 @@
-#! /usr/bin/php
+#!/usr/bin/php
 <?php
 /**
  * FusionForge document search engine
@@ -38,7 +38,7 @@ $fichin = $argv[1];
 if (!is_file($fichin))
 	exit (1);
 
-$fichout = tempnam(forge_get_config('data_path'), 'tmp');
+$fichout = tempnam(sys_get_temp_dir(), 'docman');
 $cmd = "/usr/bin/unoconv -d document -f text -o $fichout $fichin";
 $res = shell_exec($cmd);
 
diff --git a/src/common/docman/engine/parser_unoconv_presentation.php b/src/common/docman/engine/parser_unoconv_presentation.php
index 0736f8e..0e987d7 100644
--- a/src/common/docman/engine/parser_unoconv_presentation.php
+++ b/src/common/docman/engine/parser_unoconv_presentation.php
@@ -1,4 +1,4 @@
-#! /usr/bin/php
+#!/usr/bin/php
 <?php
 /**
  * FusionForge document search engine
@@ -38,7 +38,7 @@ $fichin = $argv[1];
 if (!is_file($fichin))
 	exit (1);
 
-$fichout = tempnam(forge_get_config('data_path'), 'tmp');
+$fichout = tempnam(sys_get_temp_dir(), 'docman');
 $cmd = "/usr/bin/unoconv -d presentation -f pdf -o $fichout $fichin";
 $res = shell_exec($cmd);
 
diff --git a/src/common/docman/engine/parser_unoconv_spreadsheet.php b/src/common/docman/engine/parser_unoconv_spreadsheet.php
index 4752885..1309613 100644
--- a/src/common/docman/engine/parser_unoconv_spreadsheet.php
+++ b/src/common/docman/engine/parser_unoconv_spreadsheet.php
@@ -1,4 +1,4 @@
-#! /usr/bin/php
+#!/usr/bin/php
 <?php
 /**
  * FusionForge document search engine
@@ -38,7 +38,7 @@ $fichin = $argv[1];
 if (!is_file($fichin))
 	exit (1);
 
-$fichout = tempnam(forge_get_config('data_path'), 'tmp');
+$fichout = tempnam(sys_get_temp_dir(), 'docman');
 $cmd = "/usr/bin/unoconv -d spreadsheet -f pdf -o $fichout $fichin";
 $res = shell_exec($cmd);
 

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

Summary of changes:
 src/common/docman/Parsedata.class.php                    |    4 ++--
 src/common/docman/engine/parser_html.php                 |    2 +-
 src/common/docman/engine/parser_pdf.inc.php              |    1 -
 src/common/docman/engine/parser_pdf.php                  |    2 +-
 src/common/docman/engine/parser_text.php                 |    2 +-
 src/common/docman/engine/parser_unoconv_document.php     |    4 ++--
 src/common/docman/engine/parser_unoconv_presentation.php |    4 ++--
 src/common/docman/engine/parser_unoconv_spreadsheet.php  |    4 ++--
 8 files changed, 11 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list