Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 853)
+++ trunk/CHANGELOG	(revision 854)
@@ -11,6 +11,9 @@
 ! = Update/Change
 
 ------------------------------------- 2.7.1 -------------------------------------
+25-Jul-2008 Thomas Hornik
+# fixed an issues related to search, changed one SQL inner join (to use USING instead of WHERE)
+! added $database = new Database(); in front of output-filter
 05-Jul-2008 Thomas Hornik
 # fixed MODI_DATE/PUBLISHED_DATE issue in news-module. Added PUBLISHED_TIME, removed PUBL_DATE,PUBL_TIME. Thanks to forum-member timorotha
 02-Jul-2008 Christian Sommer
Index: trunk/wb/framework/class.frontend.php
===================================================================
--- trunk/wb/framework/class.frontend.php	(revision 853)
+++ trunk/wb/framework/class.frontend.php	(revision 854)
@@ -88,13 +88,12 @@
 		$table_s = TABLE_PREFIX.'sections';
 		$now = time();
 		$query_default = "
-			SELECT p.page_id, p.link
-			FROM $table_p AS p, $table_s AS s
-			WHERE p.page_id=s.page_id
-			AND p.parent = '0' AND p.visibility = 'public'
-			AND (($now>=s.publ_start OR s.publ_start=0) AND ($now<=s.publ_end OR s.publ_end=0))
+			SELECT `p`.`page_id`, `link`
+			FROM `$table_p` AS `p` INNER JOIN `$table_s` USING(`page_id`)
+			WHERE `parent` = '0' AND `visibility` = 'public'
+			AND (($now>=`publ_start` OR `publ_start`=0) AND ($now<=`publ_end` OR `publ_end`=0))
 			$this->sql_where_language
-			ORDER BY p.position ASC LIMIT 1";
+			ORDER BY `p`.`position` ASC LIMIT 1";
 		$get_default = $database->query($query_default);
 		$default_num_rows = $get_default->numRows();
 		if(!isset($page_id) OR !is_numeric($page_id)){
Index: trunk/wb/index.php
===================================================================
--- trunk/wb/index.php	(revision 853)
+++ trunk/wb/index.php	(revision 854)
@@ -87,6 +87,8 @@
 }
 
 if(file_exists(WB_PATH .'/modules/output_filter/filter-routines.php')) {
+	// reconnect to database
+	$database = new database();
 	// include the output filter module routines
 	@require_once(WB_PATH .'/modules/output_filter/filter-routines.php');
 	
Index: trunk/wb/search/search.php
===================================================================
--- trunk/wb/search/search.php	(revision 853)
+++ trunk/wb/search/search.php	(revision 854)
@@ -525,6 +525,8 @@
 	if($cfg_enable_old_search) { // this is the old (wb <= 2.6.7) search-function
 		$search_path_SQL = str_replace(' link ', ' '.TABLE_PREFIX.'pages.link ', $search_path_SQL);
 		foreach($sorted_modules AS $module) {
+			if(isset($seen_pages[$module['value']]) && count($seen_pages[$module['value']])>0) // skip modules handled by new search-func
+				continue;
 			$query_start = '';
 			$query_body = '';
 			$query_end = '';
