--- kernel/search/plugins/ezsearchengine/ezsearchengine.php 22 Feb 2006 16:15:55 -0000 1.1 +++ kernel/search/plugins/ezsearchengine/ezsearchengine.php 12 Jun 2006 16:20:24 -0000 1.2 @@ -1014,7 +1014,7 @@ } else { - $searchQuery = "SELECT DISTINCT ezcontentobject.*, ezcontentclass.name as class_name, ezcontentobject_tree.* + $searchQuery = "SELECT ezcontentobject.*, ezcontentclass.name as class_name, ezcontentobject_tree.* $versionNameTargets FROM $tmpTablesFrom $tmpTablesSeparator @@ -1022,6 +1022,7 @@ ezcontentclass, ezcontentobject_tree $versionNameTables + $sortFromSQL WHERE $tmpTablesWhere $and $tmpTablesWhereExtra @@ -1030,7 +1031,9 @@ ezcontentobject.id = ezcontentobject_tree.contentobject_id and ezcontentobject_tree.node_id = ezcontentobject_tree.main_node_id $versionNameJoins - "; + $showInvisibleNodesCond + $sortWhereSQL + ORDER BY $orderByFieldsSQL"; if ( $tmpTableCount == 0 ) { $searchCountQuery = "SELECT count( DISTINCT ezcontentobject.id ) AS count @@ -1038,14 +1041,16 @@ ezcontentobject, ezcontentclass, ezcontentobject_tree - $versionNameTables + $versionNameTables, + $sortFromSQL WHERE ezcontentobject.contentclass_id = ezcontentclass.id and ezcontentclass.version = '0' and ezcontentobject.id = ezcontentobject_tree.contentobject_id and ezcontentobject_tree.node_id = ezcontentobject_tree.main_node_id $versionNameJoins - "; + $showInvisibleNodesCond + $sortWhereSQL"; } } // Count query