aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-07 16:56:44 -0700
committerFriendika <info@friendika.com>2011-07-07 16:56:44 -0700
commiteccaa525ccdff9b449cfe420306daaca9e31aebc (patch)
tree86cd323bc091b8301db37ea06ff4063a20a6505d /include
parent0470eb78054c4d26171f5affe7848adcf22a3604 (diff)
downloadvolse-hubzilla-eccaa525ccdff9b449cfe420306daaca9e31aebc.tar.gz
volse-hubzilla-eccaa525ccdff9b449cfe420306daaca9e31aebc.tar.bz2
volse-hubzilla-eccaa525ccdff9b449cfe420306daaca9e31aebc.zip
'dislike' is not part of activitystreams core schema - use symblic constants instead
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 6b52f51cd..82a107c07 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -5,8 +5,7 @@
*/
function localize_item(&$item){
- if ($item['verb']=="http://activitystrea.ms/schema/1.0/like" ||
- $item['verb']=="http://activitystrea.ms/schema/1.0/dislike"){
+ if ($item['verb']=== ACTIVITY_LIKE || $item['verb']=== ACTIVITY_DISLIKE){
$r = q("SELECT * from `item`,`contact` WHERE
`item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
@@ -18,9 +17,9 @@ function localize_item(&$item){
$objauthor = '[url=' . $obj['author-link'] . ']' . $obj['author-name'] . '[/url]';
switch($obj['verb']){
- case 'http://activitystrea.ms/schema/1.0/post':
+ case ACTIVITY_POST:
switch ($obj['object-type']){
- case 'http://activitystrea.ms/schema/1.0/event':
+ case ACTIVITY_OBJ_EVENT:
$post_type = t('event');
break;
default:
@@ -40,19 +39,19 @@ function localize_item(&$item){
$plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
switch($item['verb']){
- case "http://activitystrea.ms/schema/1.0/like":
+ case ACTIVITY_LIKE :
$bodyverb = t('%1$s likes %2$s\'s %3$s');
break;
- case "http://activitystrea.ms/schema/1.0/dislike":
+ case ACTIVITY_DISLIKE:
$bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
break;
}
$item['body'] = sprintf($bodyverb, $author, $objauthor, $plink);
}
- if ($item['verb']=='http://activitystrea.ms/schema/1.0/make-friend'){
+ if ($item['verb']=== ACTIVITY_FRIEND){
- if ($item['object-type']=="" || $item['object-type']!='http://activitystrea.ms/schema/1.0/person') return;
+ if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
$Aname = $item['author-name'];
$Alink = $item['author-link'];