Enforce ORDER on results.

This commit is contained in:
Andrew McMillan 2006-12-10 18:52:16 +13:00
parent 940e1d0460
commit e0d34558de

View File

@ -266,6 +266,7 @@ function get_collection_contents( $depth, $user_no, $collection ) {
$sql .= "to_char(last_modified at time zone 'GMT',?) AS modified, ";
$sql .= "summary AS dav_displayname ";
$sql .= "FROM caldav_data JOIN calendar_item USING( user_no, dav_name) WHERE dav_name ~ ".qpg('^'.$collection->dav_name.'[^/]+$');
$sql .= "ORDER BY caldav_data.dav_name ";
$qry = new PgQuery($sql, PgQuery::Plain(iCalendar::HttpDateFormat()), PgQuery::Plain(iCalendar::HttpDateFormat()));
if( $qry->Exec("PROPFIND",__LINE__,__FILE__) && $qry->rows > 0 ) {
while( $item = $qry->Fetch() ) {