[Fusionforge-commits] FusionForge branch master updated. e10403a72fede824e4a9d06527e2195e88bf58cb

Franck Villaume nerville at fusionforge.org
Tue Dec 9 11:48:16 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  e10403a72fede824e4a9d06527e2195e88bf58cb (commit)
       via  ff33c99e4bf0481e91891d8db384c5ad971cecc3 (commit)
      from  ae0bbc8f04cc67b5ed334e4528cc881a29fc088d (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 e10403a72fede824e4a9d06527e2195e88bf58cb
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Dec 9 11:43:40 2014 +0100

    docman: fix get_parser_list

diff --git a/src/common/docman/Parsedata.class.php b/src/common/docman/Parsedata.class.php
index ea8afba..02ad07c 100644
--- a/src/common/docman/Parsedata.class.php
+++ b/src/common/docman/Parsedata.class.php
@@ -85,11 +85,10 @@ class Parsedata {
 	function get_parser_list($parser_path) {
 		$file = $parser_path.'parser_list.txt';
 		$rep = array();
-		$handle = fopen($file, 'r');
-		if ($handle) {
-			$buff = fread($handle, 2048);
-			$lines = explode("\n", $buff);
-			foreach ($lines as $a) {
+		$arrayLines = file($file, FILE_SKIP_EMPTY_LINES);
+		if (is_array($arrayLines) && count($arrayLines)) {
+			foreach ($arrayLines as $a) {
+				echo "$a\n";
 				if (trim($a) != "" && substr($a, 0,1) != "#") {
 					$a2 = explode ("|", $a);
 					$rep[$a2[0]] = $a2[1];

commit ff33c99e4bf0481e91891d8db384c5ad971cecc3
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Dec 9 11:42:50 2014 +0100

    indent

diff --git a/src/common/docman/engine/parser_pdf.inc.php b/src/common/docman/engine/parser_pdf.inc.php
index 9da6fdd..bb9d0c0 100644
--- a/src/common/docman/engine/parser_pdf.inc.php
+++ b/src/common/docman/engine/parser_pdf.inc.php
@@ -35,12 +35,12 @@ function parser_pdf($fichin) {
 	if (filesize($fichin) == 0)
 		return '';
 
-    $fichout = tempnam(forge_get_config('data_path'),'tmp');
-    $cmd = '/usr/bin/pdftotext '.$fichin.' '.$fichout;
-    $res = shell_exec($cmd);
-    
-    return parser_text($fichout);
-    unlink ($fichout);
+	$fichout = tempnam(forge_get_config('data_path'),'tmp');
+	$cmd = '/usr/bin/pdftotext '.$fichin.' '.$fichout;
+	$res = shell_exec($cmd);
+
+	return parser_text($fichout);
+	unlink ($fichout);
 }
 
 // Local Variables:

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

Summary of changes:
 src/common/docman/Parsedata.class.php       |    9 ++++-----
 src/common/docman/engine/parser_pdf.inc.php |   12 ++++++------
 2 files changed, 10 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list