Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 854)
+++ trunk/CHANGELOG	(revision 855)
@@ -11,6 +11,8 @@
 ! = Update/Change
 
 ------------------------------------- 2.7.1 -------------------------------------
+02-Aug-2008 Thomas Hornik
+# fixed sorting order of search-results
 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
Index: trunk/wb/search/search.php
===================================================================
--- trunk/wb/search/search.php	(revision 854)
+++ trunk/wb/search/search.php	(revision 855)
@@ -342,7 +342,7 @@
 			       p.visibility, p.viewing_groups, p.viewing_users
 			FROM $table_s AS s INNER JOIN $table_p AS p ON s.page_id = p.page_id
 			WHERE s.module = '$module_name' AND p.visibility NOT IN ('none','deleted') AND p.searching = '1' $search_path_SQL
-			ORDER BY s.section_id, s.position ASC
+			ORDER BY s.page_id, s.position ASC
 		");
 		if($sections_query->numRows() > 0) {
 			while($res = $sections_query->fetchRow()) {
