]> git.mxchange.org Git - friendica.git/commitdiff
Added ORDER BY clause for conversation view
authorMax Weller <git@max-weller.de>
Thu, 21 Jun 2012 10:55:03 +0000 (12:55 +0200)
committerMax Weller <git@max-weller.de>
Thu, 21 Jun 2012 10:55:03 +0000 (12:55 +0200)
include/api.php

index 124096bf0ffc324959562d8c517463e0cd52f50c..b77156dfaefbe6ea319f827dedbcb717cc126977 100644 (file)
 
                //$include_entities = (x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:false);
                //$sql_extra = "";
-               if ($_GET["conversation"] == "true") $sql_extra .= " AND `item`.`parent` = %d"; else $sql_extra .= " AND `item`.`id` = %d";
+               if ($_GET["conversation"] == "true") $sql_extra .= " AND `item`.`parent` = %d  ORDER BY `received` ASC "; else $sql_extra .= " AND `item`.`id` = %d";
 
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
                        `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,