X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnetwork.php;h=0f9b0d2339ad41977f03e864c517b7b12bda4d00;hb=58ac6bde098ce2b28d851767b5aaf7d9095d6a44;hp=a28840dae2e247bab9c6cdaeb7384f98026e9521;hpb=d4b092cec6f1a80d578981d80996ccec81d2d9a7;p=friendica.git diff --git a/mod/network.php b/mod/network.php index a28840dae2..0f9b0d2339 100644 --- a/mod/network.php +++ b/mod/network.php @@ -22,7 +22,7 @@ function network_init(&$a) { parse_str($query_string, $query_array); array_shift($query_array); - + // fetch last used network view and redirect if needed if(! $is_a_date_query) { $sel_tabs = network_query_get_sel_tab($a); @@ -705,12 +705,16 @@ die("ss"); // Fetch a page full of parent items for this page if($update) { + if (!get_config("system", "like_no_comment")) + $sql_extra4 = "(`item`.`deleted` = 0 OR `item`.`verb` = '".ACTIVITY_LIKE."' OR `item`.`verb` = '".ACTIVITY_DISLIKE."')"; + else + $sql_extra4 = "`item`.`deleted` = 0 AND `item`.`verb` = '".ACTIVITY_POST."'"; + $r = q("SELECT `item`.`parent` AS `item_id`, `item`.`network` AS `item_network`, `contact`.`uid` AS `contact_uid` FROM $sql_table $sql_post_table INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND - (`item`.`deleted` = 0 OR `item`.`verb` = '" . ACTIVITY_LIKE ."' OR `item`.`verb` = '" . ACTIVITY_DISLIKE . "') - and `item`.`moderated` = 0 and `item`.`unseen` = 1 + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND $sql_extra4 + AND `item`.`moderated` = 0 AND `item`.`unseen` = 1 $sql_extra3 $sql_extra $sql_nets ORDER BY `item_id` DESC LIMIT 100", intval(local_user()) );