elgg-gitbot / test2

0 stars 0 forks source link

get_entity_dates() needs order (Trac #1406) #97

Closed elgg-gitbot closed 11 years ago

elgg-gitbot commented 11 years ago

Original ticket http://trac.elgg.org/ticket/1406 on 2009-12-08 by trac user marcus, assigned to unknown.

Elgg version: 1.6

Currently get_entity_dates does not order query which results in an unsorted menu.

E.g.:

--- /tmp/entities.php 2009-12-08 18:34:12.000000000 +0000 +++ entities.php 2009-12-08 18:31:10.000000000 +0000 @@ -1625,7 +1625,7 @@ * return string A viewable list of entities */

function list_entities($type= "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = false, $pagination = true) {

+ $offset = (int) get_input('offset'); $count = get_entities($type, $subtype, $owner_guid, "", $limit, $offset, true); $entities = get_entities($type, $subtype, $owner_guid, "", $limit, $offset); @@ -1721,7 +1721,7 @@ $sql = "SELECT DISTINCT EXTRACT(YEAR_MONTH FROM FROM_UNIXTIME(time_created)) AS yearmonth FROM {$CONFIG->dbprefix}entities where "; foreach ($where as $w) $sql .= " $w and ";

elgg-gitbot commented 11 years ago

brettp wrote on 2010-02-01

(In [svn:3892]) Fixes (Trac Ticket 1406): get_entity_dates() supports order by.