From: Michael Date: Wed, 13 Sep 2017 09:20:08 +0000 (+0000) Subject: Rearranged code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=92537d69269b464eae6f693d2dd288bc879709b0;p=friendica.git Rearranged code --- diff --git a/mod/network.php b/mod/network.php index 9d68b33146..e4a33fe1b5 100644 --- a/mod/network.php +++ b/mod/network.php @@ -290,7 +290,7 @@ function network_query_get_sel_group(App $a) { return $group; } -function networkSetPager($a, $update) { +function networkPager($a, $update) { if ($update) { // only setup pagination on initial page view return ' LIMIT 100'; @@ -442,7 +442,7 @@ function networkFlatView(App $a, $update = 0) { $sql_post_table = " INNER JOIN `thread` ON `thread`.`iid` = `item`.`parent`"; } - $pager_sql = networkSetPager($a, $update); + $pager_sql = networkPager($a, $update); // show all items unthreaded in reverse created date order $items = q("SELECT %s FROM `item` $sql_post_table %s @@ -696,8 +696,6 @@ function networkThreadedView(App $a, $update = 0) { $sql_extra3 .= " AND $sql_table.`mention`"; } - $pager_sql = networkSetPager($a, $update); - // Normal conversation view if ($order === 'post') { $ordering = "`created`"; @@ -719,6 +717,8 @@ function networkThreadedView(App $a, $update = 0) { $sql_extra3 .= sprintf(" AND $sql_order <= '%s'", dbesc($_GET["offset"])); } + $pager_sql = networkPager($a, $update); + switch ($order_mode) { case 'received': if ($last_received != '') {