Changeset 377
- Timestamp:
- 07/01/09 16:44:51 (4 months ago)
- Files:
-
- elgg/branches/elgg1.5/engine/lib/relationships.php (modified) (1 diff)
- elgg/branches/elgg1.5/engine/lib/tags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
elgg/branches/elgg1.5/engine/lib/relationships.php
r363 r377 662 662 if (!$count) { 663 663 $query .= " group by e.guid,e.type,e.subtype,e.owner_guid,e.site_guid,e.container_guid,e.access_id,e.time_created,e.time_updated,e.enabled ";//postgres requires all fields being selected to be listed in the group by clause. 664 $query .= " order by totaldesc limit {$limit} offset {$offset}"; // Add order and limit664 $query .= " order by count(distinct e.guid) desc limit {$limit} offset {$offset}"; // Add order and limit 665 665 return get_data($query, "entity_row_to_elggstar"); 666 666 } else { elgg/branches/elgg1.5/engine/lib/tags.php
r268 r377 137 137 $query .= ' and ' . get_access_sql_suffix("e"); // Add access controls 138 138 139 $query .= " group by msvalue.string having total > {$threshold} order by totaldesc limit {$limit} ";139 $query .= " group by msvalue.string having count(msvalue.id) > {$threshold} order by count(msvalue.id) desc limit {$limit} "; 140 140 141 141 return get_data($query);

