aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-24 16:23:30 -0800
committerfriendica <info@friendica.com>2012-01-24 16:23:30 -0800
commit3a1a4d62d95c63322ea5b9b91a0ad44f1b5a0e5c (patch)
tree215dfe0a1790fa93d68f0dfa101b2ffbef16b261
parenta76a497d924a16b8b07b126408db21655aac3bd6 (diff)
downloadvolse-hubzilla-3a1a4d62d95c63322ea5b9b91a0ad44f1b5a0e5c.tar.gz
volse-hubzilla-3a1a4d62d95c63322ea5b9b91a0ad44f1b5a0e5c.tar.bz2
volse-hubzilla-3a1a4d62d95c63322ea5b9b91a0ad44f1b5a0e5c.zip
bug #254
-rwxr-xr-xboot.php4
-rwxr-xr-xinclude/conversation.php28
2 files changed, 31 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index e02a28b11..554cdf27c 100755
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1233' );
+define ( 'FRIENDICA_VERSION', '2.3.1234' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1116 );
@@ -89,6 +89,7 @@ define ( 'PAGE_NORMAL', 0 );
define ( 'PAGE_SOAPBOX', 1 );
define ( 'PAGE_COMMUNITY', 2 );
define ( 'PAGE_FREELOVE', 3 );
+define ( 'PAGE_BLOG', 4 );
/**
* Network and protocol family types
@@ -166,6 +167,7 @@ define ( 'ACTIVITY_UNFOLLOW', NAMESPACE_ACTIVITY_SCHEMA . 'stop-following' );
define ( 'ACTIVITY_POST', NAMESPACE_ACTIVITY_SCHEMA . 'post' );
define ( 'ACTIVITY_UPDATE', NAMESPACE_ACTIVITY_SCHEMA . 'update' );
define ( 'ACTIVITY_TAG', NAMESPACE_ACTIVITY_SCHEMA . 'tag' );
+define ( 'ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite' );
define ( 'ACTIVITY_OBJ_COMMENT', NAMESPACE_ACTIVITY_SCHEMA . 'comment' );
define ( 'ACTIVITY_OBJ_NOTE', NAMESPACE_ACTIVITY_SCHEMA . 'note' );
diff --git a/include/conversation.php b/include/conversation.php
index d05b3be5c..20c7b2a51 100755
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -116,6 +116,34 @@ function localize_item(&$item){
$item['body'] = sprintf( t('%1$s tagged %2$s\'s %3$s with %4$s'), $author, $objauthor, $plink, $tag );
}
+ if ($item['verb']=== ACTIVITY_FAVORITE){
+
+ if ($item['object-type']== "")
+ return;
+
+ $Aname = $item['author-name'];
+ $Alink = $item['author-link'];
+
+ $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
+
+ $obj = parse_xml_string($xmlhead.$item['object']);
+ if(strlen($obj->id)) {
+ $r = q("select * from item where uri = '%s' and uid = %d limit 1",
+ dbesc($obj->id),
+ intval($item['uid'])
+ );
+ if(count($r) && $r[0]['plink']) {
+ $target = $r[0];
+ $Bname = $target['author-name'];
+ $Blink = $target['author-link'];
+ $A = '[url=' . $Alink . ']' . $Aname . '[/url]';
+ $B = '[url=' . $Blink . ']' . $Bname . '[/url]';
+ $P = '[url=' . $target['plink'] . ']' . t('post/item') . '[/url]';
+ $item['body'] = sprintf( t('%1$s marked %2$s\'s %3$s as favorite'), $A, $B, $P)."\n";
+
+ }
+ }
+ }
}