[evolvis-commits] r18386: upstream pending merges:↵ aljeux 2012-04-28 Fix [#354] News appears under Forum↵ Roland Mas 2012-04-27 Uploading 5.1.1-6 to Debian↵ Roland Mas 2012-04-27 Stop using local.pl in install-dns.sh↵ Roland Mas 2012-04-27 Fixed row coloring (detected by a PHP warning)↵ Roland Mas 2012-04-26 Add one more missing column to GROUP BY clause↵ Roland Mas 2012-04-26 Add one more missing column to GROUP BY clause↵ Roland Mas 2012-04-26 Add missing columns to GROUP BY clause↵ Roland Mas 2012-04-26 Bump version number in debian/changelog↵ Roland Mas 2012-04-26 Fixes in search: missing columns in SQL queries when use_fti=no

mirabilos at evolvis.org mirabilos at evolvis.org
Thu May 3 16:15:39 CEST 2012


Author: mirabilos
Date: 2012-05-03 16:15:38 +0200 (Thu, 03 May 2012)
New Revision: 18386

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/forum/ForumFactory.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php
   trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumSearchQuery.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumsSearchQuery.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/search/TasksSearchQuery.class.php
   trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-dns.sh
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/www/include/html.php
   trunk/gforge_base/evolvisforge-5.1/src/www/search/include/renderers/ForumHtmlSearchRenderer.class.php
Log:
upstream pending merges:
    aljeux 2012-04-28 Fix [#354] News appears under Forum
    Roland Mas 2012-04-27 Uploading 5.1.1-6 to Debian
    Roland Mas 2012-04-27 Stop using local.pl in install-dns.sh
    Roland Mas 2012-04-27 Fixed row coloring (detected by a PHP warning)
    Roland Mas 2012-04-26 Add one more missing column to GROUP BY clause
    Roland Mas 2012-04-26 Add one more missing column to GROUP BY clause
    Roland Mas 2012-04-26 Add missing columns to GROUP BY clause
    Roland Mas 2012-04-26 Bump version number in debian/changelog
    Roland Mas 2012-04-26 Fixes in search: missing columns in SQL queries when use_fti=no

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/forum/ForumFactory.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/forum/ForumFactory.class.php	2012-05-03 14:15:28 UTC (rev 18385)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/forum/ForumFactory.class.php	2012-05-03 14:15:38 UTC (rev 18386)
@@ -72,10 +72,13 @@
 
 	function &getAllForumIds() {
 		$result = array () ;
-		$res = db_query_params ('SELECT * FROM forum_group_list_vw
-WHERE group_id=$1
+		$res = db_query_params('SELECT group_forum_id FROM forum_group_list
+WHERE group_forum_id NOT IN (
+	SELECT group_forum_id FROM forum_group_list WHERE group_forum_id IN (
+		SELECT forum_id FROM news_bytes))
+AND group_id=$1
 ORDER BY group_forum_id',
-					   array ($this->Group->getID())) ;
+			array ($this->Group->getID()));
 		if (!$res) {
 			return $result ;
 		}

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumSearchQuery.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumSearchQuery.class.php	2012-05-03 14:15:28 UTC (rev 18385)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumSearchQuery.class.php	2012-05-03 14:15:38 UTC (rev 18386)
@@ -68,7 +68,7 @@
 		if (forge_get_config('use_fti')) {
 			$words = $this->getFTIwords();
 			$qpa = db_construct_qpa ($qpa,
-						 'SELECT x.* FROM (SELECT forum.msg_id, ts_headline(forum.subject, $1::tsquery) AS subject, forum.post_date, users.realname, forum.subject||$2||forum.body as full_string_agg, forum_idx.vectors FROM forum, users, to_tsquery($1) AS q, forum_idx WHERE forum.group_forum_id = $3 AND forum.posted_by = users.user_id AND forum_idx.msg_id = forum.msg_id GROUP BY forum.msg_id, subject, body, post_date, realname, forum_idx.vectors) AS x WHERE vectors @@ $1::tsquery ',
+						 'SELECT x.* FROM (SELECT forum.group_forum_id, forum.msg_id, ts_headline(forum.subject, $1::tsquery) AS subject, forum.post_date, users.realname, forum.subject||$2||forum.body as full_string_agg, forum_idx.vectors FROM forum, users, to_tsquery($1) AS q, forum_idx WHERE forum.group_forum_id = $3 AND forum.posted_by = users.user_id AND forum_idx.msg_id = forum.msg_id GROUP BY forum.group_forum_id, forum.msg_id, subject, body, post_date, realname, forum_idx.vectors) AS x WHERE vectors @@ $1::tsquery ',
 						 array ($words,
 							$this->field_separator,
 							$this->forumId)) ;
@@ -86,7 +86,7 @@
 						 array($words)) ;
 		} else {
 			$qpa = db_construct_qpa ($qpa,
-						 'SELECT x.* FROM (SELECT forum.msg_id, forum.subject, forum.post_date, users.realname, forum.subject||$1||forum.body as full_string_agg FROM forum,users WHERE users.user_id=forum.posted_by AND forum.group_forum_id=$2 GROUP BY msg_id, subject, post_date, realname, body) AS x WHERE ',
+						 'SELECT x.* FROM (SELECT forum.group_forum_id, forum.msg_id, forum.subject, forum.post_date, users.realname, forum.subject||$1||forum.body as full_string_agg FROM forum,users WHERE users.user_id=forum.posted_by AND forum.group_forum_id=$2 GROUP BY forum.group_forum_id, msg_id, subject, post_date, realname, body) AS x WHERE ',
 						 array ($this->field_separator,
 							$this->forumId)) ;
 			$qpa = $this->addIlikeCondition ($qpa, 'full_string_agg') ;

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumsSearchQuery.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumsSearchQuery.class.php	2012-05-03 14:15:28 UTC (rev 18385)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/search/ForumsSearchQuery.class.php	2012-05-03 14:15:38 UTC (rev 18386)
@@ -108,7 +108,7 @@
 						 'ORDER BY forum_group_list.forum_name ASC, forum.msg_id ASC, ts_rank(vectors, q) DESC') ;
 		} else {
 			$qpa = db_construct_qpa ($qpa,
-						 'SELECT x.* FROM (SELECT forum.msg_id, forum.subject, forum.post_date, users.realname, forum_group_list.forum_name, forum.subject||$1||forum.body as full_string_agg FROM forum, users, forum_group_list WHERE users.user_id = forum.posted_by AND forum_group_list.group_forum_id = forum.group_forum_id AND forum_group_list.is_public <> 9 AND forum.group_forum_id IN (SELECT group_forum_id FROM forum_group_list WHERE group_id = $2) ',
+						 'SELECT x.* FROM (SELECT forum.group_forum_id, forum.msg_id, forum.subject, forum.post_date, users.realname, forum_group_list.forum_name, forum.subject||$1||forum.body as full_string_agg FROM forum, users, forum_group_list WHERE users.user_id = forum.posted_by AND forum_group_list.group_forum_id = forum.group_forum_id AND forum_group_list.is_public <> 9 AND forum.group_forum_id IN (SELECT group_forum_id FROM forum_group_list WHERE group_id = $2) ',
 						 array ($this->field_separator,
 							$this->groupId)) ;
 			if ($this->sections != SEARCH__ALL_SECTIONS) {

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/search/TasksSearchQuery.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/search/TasksSearchQuery.class.php	2012-05-03 14:15:28 UTC (rev 18385)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/search/TasksSearchQuery.class.php	2012-05-03 14:15:38 UTC (rev 18386)
@@ -94,7 +94,7 @@
 						 array());
 		}
 		$qpa = db_construct_qpa ($qpa,
-					 ' GROUP BY project_task.project_task_id',
+					 ' GROUP BY project_task.project_task_id, project_task.summary, project_task.details, project_task.percent_complete, project_task.start_date, project_task.end_date, project_task.created_by, project_task.group_project_id',
 					 array());
 		
 		if (forge_get_config('use_fti')) {

Modified: trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-dns.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-dns.sh	2012-05-03 14:15:28 UTC (rev 18385)
+++ trunk/gforge_base/evolvisforge-5.1/src/deb-specific/install-dns.sh	2012-05-03 14:15:38 UTC (rev 18386)
@@ -14,8 +14,8 @@
 case "$1" in
     configure-files)
 	cp -a /etc/bind/named.conf /etc/bind/named.conf.gforge-new
-	domain_name=$(perl -e'require "/etc/gforge/local.pl"; print "$domain_name\n";')
-	ip_address=$(perl -e'require "/etc/gforge/local.pl"; print "$sys_ip_address\n";')
+        domain_name=`/usr/share/gforge/bin/forge_get_config web_host`
+        ip_address=`/usr/share/gforge/bin/forge_get_config ip_address`
 	# export domain_name=$1
 	# export ip_address=$2
   	if ! grep -q "// Next line inserted by GForge install" /etc/bind/named.conf.gforge-new ; then
@@ -26,9 +26,9 @@
   	fi
 	;;
     configure)
-	domain_name=$(perl -e'require "/etc/gforge/local.pl"; print "$domain_name\n";')
-	ip_address=$(perl -e'require "/etc/gforge/local.pl"; print "$sys_ip_address\n";')
-	sys_simple_dns=$(perl -e'require "/etc/gforge/local.pl"; print "$sys_simple_dns\n";')
+        domain_name=`/usr/share/gforge/bin/forge_get_config web_host`
+        ip_address=`/usr/share/gforge/bin/forge_get_config ip_address`
+        sys_simple_dns=`/usr/share/gforge/bin/forge_get_config simple_dns`
   	serial=`date '+%Y%m%d'`01
   	# scm_host lists_host are useless for now
   	for i in domain_name ip_address serial ; do

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-05-03 14:15:28 UTC (rev 18385)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-05-03 14:15:38 UTC (rev 18386)
@@ -23,6 +23,14 @@
 
  -- Thorsten Glaser <t.glaser at tarent.de>  Wed, 02 May 2012 14:33:58 +0200
 
+fusionforge (5.1.1-6) unstable; urgency=low
+
+  * Fixes in search.
+  * Use current way to get configuration values instead of looking for the
+    old file, thanks to Andreas Beckmann (closes: #668878).
+
+ -- Roland Mas <lolando at debian.org>  Fri, 27 Apr 2012 14:38:52 +0200
+
 fusionforge (1:5.1.1+evolvis56) unstable; urgency=low
 
   * My Account: languages not shipped and not English (untranslated)

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/search/include/renderers/ForumHtmlSearchRenderer.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/search/include/renderers/ForumHtmlSearchRenderer.class.php	2012-05-03 14:15:28 UTC (rev 18385)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/search/include/renderers/ForumHtmlSearchRenderer.class.php	2012-05-03 14:15:38 UTC (rev 18386)
@@ -93,12 +93,14 @@
 		$dateFormat = _('Y-m-d H:i');
 		
 		$return = '';
+		$i = 0;
 		foreach ($fd as $row) {
 			$return .= '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td width="50%"><a href="'.util_make_url ('/forum/message.php?msg_id=' . $row['msg_id']).'">'
 				. html_image('ic/msg.png', '10', '12')
 				. ' '.$row['subject'].'</a></td>'
 				. '<td width="30%">'.$row['realname'].'</td>'
 				. '<td width="20%">'.date($dateFormat, $row['post_date']).'</td></tr>';
+			$i++;
 		}
 		return $return;
 	}



More information about the evolvis-commits mailing list