[Fusionforge-commits] r13745 - in branches/Branch_5_1/src: common/search www/search/include/renderers

Franck VILLAUME nerville at fusionforge.org
Mon Jul 11 17:56:06 CEST 2011


Author: nerville
Date: 2011-07-11 17:56:06 +0200 (Mon, 11 Jul 2011)
New Revision: 13745

Modified:
   branches/Branch_5_1/src/common/search/DocsSearchQuery.class.php
   branches/Branch_5_1/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
Log:
fix url to view file: title -> filename

Modified: branches/Branch_5_1/src/common/search/DocsSearchQuery.class.php
===================================================================
--- branches/Branch_5_1/src/common/search/DocsSearchQuery.class.php	2011-07-11 09:22:45 UTC (rev 13744)
+++ branches/Branch_5_1/src/common/search/DocsSearchQuery.class.php	2011-07-11 15:56:06 UTC (rev 13745)
@@ -71,7 +71,7 @@
 		} else {
 			$qpa = db_construct_qpa () ;
 			$qpa = db_construct_qpa ($qpa,
-						 'SELECT doc_data.docid, doc_data.title, doc_data.description, doc_groups.groupname FROM doc_data, doc_groups WHERE doc_data.doc_group = doc_groups.doc_group AND doc_data.group_id = $1',
+						 'SELECT doc_data.docid, doc_data.title, doc_data.filename, doc_data.description, doc_groups.groupname FROM doc_data, doc_groups WHERE doc_data.doc_group = doc_groups.doc_group AND doc_data.group_id = $1',
 						 array ($this->groupId)) ;
 			if ($this->sections != SEARCH__ALL_SECTIONS) {
 				$qpa = db_construct_qpa ($qpa,
@@ -104,7 +104,7 @@
 		$qpa = db_construct_qpa () ;
 		if(count($this->words)) {
 			$qpa = db_construct_qpa ($qpa,
-						 'SELECT doc_data.docid, headline(doc_data.title, q) AS title, headline(doc_data.description, q) AS description doc_groups.groupname FROM doc_data, doc_groups, doc_data_idx, to_tsquery($1) q',
+						 'SELECT doc_data.docid, doc_data.filename, headline(doc_data.title, q) AS title, headline(doc_data.description, q) AS description doc_groups.groupname FROM doc_data, doc_groups, doc_data_idx, to_tsquery($1) q',
 						 array (implode (' ', $words))) ;
 			$qpa = db_construct_qpa ($qpa,
 						 ' WHERE doc_data.doc_group = doc_groups.doc_group AND doc_data.docid = doc_data_idx.docid AND (vectors @@ q') ;
@@ -139,7 +139,7 @@
 						 ' ORDER BY rank(vectors, q) DESC, groupname ASC') ;
 		} else {
 			$qpa = db_construct_qpa ($qpa,
-						 'SELECT doc_data.docid, title, description doc_groups.groupname FROM doc_data, doc_groups') ;
+						 'SELECT doc_data.docid, title, filename, description doc_groups.groupname FROM doc_data, doc_groups') ;
 			$qpa = db_construct_qpa ($qpa,
 						 'WHERE doc_data.doc_group = doc_groups.doc_group') ;
 			if (count($this->phrases)) {

Modified: branches/Branch_5_1/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
===================================================================
--- branches/Branch_5_1/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php	2011-07-11 09:22:45 UTC (rev 13744)
+++ branches/Branch_5_1/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php	2011-07-11 15:56:06 UTC (rev 13745)
@@ -78,7 +78,7 @@
 			$return .= '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) .'>'
 				. '<td width="5%"> </td>'
 				. '<td>'.db_result($result, $i, 'docid').'</td>'
-				. '<td><a href="'.util_make_url ('/docman/view.php/'.$this->groupId . '/'.db_result($result, $i, 'docid').'/'.db_result($result, $i, 'title')).'">'
+				. '<td><a href="'.util_make_url ('/docman/view.php/'.$this->groupId . '/'.db_result($result, $i, 'docid').'/'.db_result($result, $i, 'filename')).'">'
 				. html_image('ic/msg.png', '10', '12', array('border' => '0'))
 				. ' '.db_result($result, $i, 'title').'</a></td>'
 				. '<td>'.db_result($result, $i, 'description').'</td></tr>';




More information about the Fusionforge-commits mailing list