[Fusionforge-commits] r16559 - branches/Branch_5_1/src/cronjobs

Franck VILLAUME nerville at fusionforge.org
Wed Oct 17 22:52:25 CEST 2012


Author: nerville
Date: 2012-10-17 22:52:24 +0200 (Wed, 17 Oct 2012)
New Revision: 16559

Modified:
   branches/Branch_5_1/src/cronjobs/update_docdata_dataword.php
Log:
remove useless var & use htmlspecialchars when needed

Modified: branches/Branch_5_1/src/cronjobs/update_docdata_dataword.php
===================================================================
--- branches/Branch_5_1/src/cronjobs/update_docdata_dataword.php	2012-10-17 20:51:35 UTC (rev 16558)
+++ branches/Branch_5_1/src/cronjobs/update_docdata_dataword.php	2012-10-17 20:52:24 UTC (rev 16559)
@@ -31,8 +31,7 @@
 require_once $gfcommon.'docman/DocumentFactory.class.php';
 require_once $gfcommon.'docman/DocumentGroupFactory.class.php';
 
-$engine_path = dirname(__FILE__).'/../common/docman/engine/';
-$p = new Parsedata($engine_path);
+$p = new Parsedata();
 
 $timestarttrait = microtime_float();
 // documents list
@@ -54,13 +53,13 @@
 foreach ($resarr as $item) {
 	$compt++;
 	$timestart = microtime_float();
-	$doc_dataData = db_query_params('SELECT data from doc_data where docid = $1', array($item["docid"]));
+	$doc_dataData = db_query_params('SELECT data from doc_data where docid = $1', array($item['docid']));
 	if (!$doc_dataData) {
 		die("unable to get data: ".db_error());
 	}
 	$data1 = base64_decode($doc_dataData["data"]);
 	$lenin = strlen($data1);
-	$res = $p->get_parse_data($data1, $item["title"], $item["description"], $item["filetype"]);
+	$res = $p->get_parse_data($data1, htmlspecialchars($item['title']), htmlspecialchars($item['description']), $item["filetype"]);
 	$len = strlen($res);
 	$resUp = db_query_params('UPDATE doc_data SET data_words=$1 WHERE docid=$2',
 			 array ($res, $item["docid"]));




More information about the Fusionforge-commits mailing list