From: rabuzarus <> Date: Fri, 9 Oct 2015 12:20:01 +0000 (+0200) Subject: update attendance state on profile wall X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0eae67ea48dbce33f0037bc1f77aa71c42f2df02;p=friendica.git update attendance state on profile wall --- diff --git a/include/conversation.php b/include/conversation.php index 5bc6525b72..fd03f4b788 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -101,9 +101,9 @@ function localize_item(&$item){ $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">"; if (activity_match($item['verb'],ACTIVITY_LIKE) - || activity_match($item['verb'],ACTIVITY_DISLIKE) - || activity_match($item['verb'],ACTIVITY_ATTEND) - || activity_match($item['verb'],ACTIVITY_ATTENDNO) + || activity_match($item['verb'],ACTIVITY_DISLIKE) + || activity_match($item['verb'],ACTIVITY_ATTEND) + || activity_match($item['verb'],ACTIVITY_ATTENDNO) || activity_match($item['verb'],ACTIVITY_ATTENDMAYBE)){ $r = q("SELECT * from `item`,`contact` WHERE diff --git a/include/items.php b/include/items.php index a5d2c36911..ad41a0380d 100644 --- a/include/items.php +++ b/include/items.php @@ -2751,9 +2751,9 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) $datarray['parent-uri'] = $parent_uri; $datarray['uid'] = $importer['uid']; $datarray['contact-id'] = $contact['id']; - if(($datarray['verb'] === ACTIVITY_LIKE) - || ($datarray['verb'] === ACTIVITY_DISLIKE) - || ($datarray['verb'] === ACTIVITY_ATTEND) + if(($datarray['verb'] === ACTIVITY_LIKE) + || ($datarray['verb'] === ACTIVITY_DISLIKE) + || ($datarray['verb'] === ACTIVITY_ATTEND) || ($datarray['verb'] === ACTIVITY_ATTENDNO) || ($datarray['verb'] === ACTIVITY_ATTENDMAYBE)) { $datarray['type'] = 'activity'; @@ -3743,8 +3743,8 @@ function local_delivery($importer,$data) { $datarray['contact-id'] = $importer['id']; if(($datarray['verb'] === ACTIVITY_LIKE) - || ($datarray['verb'] === ACTIVITY_DISLIKE) - || ($datarray['verb'] === ACTIVITY_ATTEND) + || ($datarray['verb'] === ACTIVITY_DISLIKE) + || ($datarray['verb'] === ACTIVITY_ATTEND) || ($datarray['verb'] === ACTIVITY_ATTENDNO) || ($datarray['verb'] === ACTIVITY_ATTENDMAYBE)) { $is_like = true; @@ -3936,8 +3936,8 @@ function local_delivery($importer,$data) { $datarray['uid'] = $importer['importer_uid']; $datarray['contact-id'] = $importer['id']; if(($datarray['verb'] === ACTIVITY_LIKE) - || ($datarray['verb'] === ACTIVITY_DISLIKE) - || ($datarray['verb'] === ACTIVITY_ATTEND) + || ($datarray['verb'] === ACTIVITY_DISLIKE) + || ($datarray['verb'] === ACTIVITY_ATTEND) || ($datarray['verb'] === ACTIVITY_ATTENDNO) || ($datarray['verb'] === ACTIVITY_ATTENDMAYBE)) { $datarray['type'] = 'activity'; diff --git a/mod/network.php b/mod/network.php index 9daec49761..9389c07e1b 100644 --- a/mod/network.php +++ b/mod/network.php @@ -732,9 +732,9 @@ function network_content(&$a, $update = 0) { // 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."' - OR `item`.`verb` = '".ACTIVITY_ATTEND."' OR `item`.`verb` = '".ACTIVITY_ATTENDNO."' + $sql_extra4 = "(`item`.`deleted` = 0 + OR `item`.`verb` = '".ACTIVITY_LIKE."' OR `item`.`verb` = '".ACTIVITY_DISLIKE."' + OR `item`.`verb` = '".ACTIVITY_ATTEND."' OR `item`.`verb` = '".ACTIVITY_ATTENDNO."' OR `item`.`verb` = '".ACTIVITY_ATTENDMAYBE."')"; else $sql_extra4 = "`item`.`deleted` = 0 AND `item`.`verb` = '".ACTIVITY_POST."'"; diff --git a/mod/profile.php b/mod/profile.php index 608971d08d..b7b76cbb5b 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -221,8 +221,10 @@ function profile_content(&$a, $update = 0) { FROM `item` 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 + (`item`.`deleted` = 0 OR item.verb = '" . ACTIVITY_LIKE ."' + OR item.verb = '" . ACTIVITY_DISLIKE . "' OR item.verb = '" . ACTIVITY_ATTEND . "' + OR item.verb = '" . ACTIVITY_ATTENDNO . "' OR item.verb = '" . ACTIVITY_ATTENDMAYBE . "') + AND `item`.`moderated` = 0 and `item`.`unseen` = 1 AND `item`.`wall` = 1 $sql_extra ORDER BY `item`.`created` DESC",