aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-02-03 16:53:49 -0800
committerzotlabs <mike@macgirvin.com>2019-02-03 16:53:49 -0800
commit8ff9a9ff08db1a6e821b9d74c0a58e8ced174d9b (patch)
treeb88764d7e68fef0a694c1d41fe08e21aa2281abd /Zotlabs
parenta56bc0e1e03aa6b369cf33fc4f4af49c55f3a276 (diff)
downloadvolse-hubzilla-8ff9a9ff08db1a6e821b9d74c0a58e8ced174d9b.tar.gz
volse-hubzilla-8ff9a9ff08db1a6e821b9d74c0a58e8ced174d9b.tar.bz2
volse-hubzilla-8ff9a9ff08db1a6e821b9d74c0a58e8ced174d9b.zip
fix linkify_tags() so it works with xchans across multiple protocols, also some fixes to activity parsing from upstream.
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php7
-rw-r--r--Zotlabs/Module/Admin/Site.php2
-rw-r--r--Zotlabs/Module/Events.php4
-rw-r--r--Zotlabs/Module/Item.php4
-rw-r--r--Zotlabs/Module/Mail.php4
-rw-r--r--Zotlabs/Module/Photos.php2
-rw-r--r--Zotlabs/Module/Profiles.php28
7 files changed, 27 insertions, 24 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 8cfa18997..259419f54 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1411,6 +1411,9 @@ class Activity {
$s['owner_xchan'] = $act->actor['id'];
$s['author_xchan'] = $act->actor['id'];
+ // ensure we store the original actor
+ self::actor_store($act->actor['id'],$act->actor);
+
$s['mid'] = $act->obj['id'];
$s['parent_mid'] = $act->parent_id;
@@ -1483,7 +1486,8 @@ class Activity {
$s['verb'] = self::activity_decode_mapper($act->type);
- if($act->type === 'Tombstone') {
+
+ if($act->type === 'Tombstone' || ($act->type === 'Create' && $act->obj['type'] === 'Tombstone')) {
$s['item_deleted'] = 1;
}
@@ -1492,7 +1496,6 @@ class Activity {
$s['obj_type'] = ACTIVITY_OBJ_COMMENT;
}
-
if($act->obj['type'] === 'Event') {
$s['obj'] = [];
$s['obj']['asld'] = $act->obj;
diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php
index 09b038729..55c8ca928 100644
--- a/Zotlabs/Module/Admin/Site.php
+++ b/Zotlabs/Module/Admin/Site.php
@@ -119,7 +119,7 @@ class Site {
del_config('system', 'admininfo');
} else {
require_once('include/text.php');
- linkify_tags($a, $admininfo, local_channel());
+ linkify_tags($admininfo, local_channel());
set_config('system', 'admininfo', $admininfo);
}
set_config('system','siteinfo',$siteinfo);
diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php
index 7e5204e62..e883db49f 100644
--- a/Zotlabs/Module/Events.php
+++ b/Zotlabs/Module/Events.php
@@ -97,8 +97,8 @@ class Events extends \Zotlabs\Web\Controller {
$type = escape_tags(trim($_POST['type']));
require_once('include/text.php');
- linkify_tags($a, $desc, local_channel());
- linkify_tags($a, $location, local_channel());
+ linkify_tags($desc, local_channel());
+ linkify_tags($location, local_channel());
//$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 24949c626..a48a25e03 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -553,8 +553,8 @@ class Item extends Controller {
// Look for tags and linkify them
- $results = linkify_tags($a, $summary, ($uid) ? $uid : $profile_uid);
- $results = linkify_tags($a, $body, ($uid) ? $uid : $profile_uid);
+ $results = linkify_tags($summary, ($uid) ? $uid : $profile_uid);
+ $results = linkify_tags($body, ($uid) ? $uid : $profile_uid);
if($results) {
diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php
index d38c1d88c..3202d38a5 100644
--- a/Zotlabs/Module/Mail.php
+++ b/Zotlabs/Module/Mail.php
@@ -34,7 +34,7 @@ class Mail extends \Zotlabs\Web\Controller {
}
else {
$body = cleanup_bbcode($body);
- $results = linkify_tags($a, $body, local_channel());
+ $results = linkify_tags($body, local_channel());
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
$attachments = array();
@@ -111,7 +111,7 @@ class Mail extends \Zotlabs\Web\Controller {
}
require_once('include/text.php');
- linkify_tags($a, $body, local_channel());
+ linkify_tags($body, local_channel());
if(! $recipient) {
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index 3833d5088..a761dbd14 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -422,7 +422,7 @@ class Photos extends \Zotlabs\Web\Controller {
require_once('include/text.php');
$profile_uid = \App::$profile['profile_uid'];
- $results = linkify_tags($a, $rawtags, (local_channel()) ? local_channel() : $profile_uid);
+ $results = linkify_tags($rawtags, (local_channel()) ? local_channel() : $profile_uid);
$success = $results['success'];
$post_tags = array();
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index de4075ba9..33e7d8a9d 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -354,20 +354,20 @@ class Profiles extends \Zotlabs\Web\Controller {
require_once('include/text.php');
- linkify_tags($a, $likes, local_channel());
- linkify_tags($a, $dislikes, local_channel());
- linkify_tags($a, $about, local_channel());
- linkify_tags($a, $interest, local_channel());
- linkify_tags($a, $interest, local_channel());
- linkify_tags($a, $contact, local_channel());
- linkify_tags($a, $channels, local_channel());
- linkify_tags($a, $music, local_channel());
- linkify_tags($a, $book, local_channel());
- linkify_tags($a, $tv, local_channel());
- linkify_tags($a, $film, local_channel());
- linkify_tags($a, $romance, local_channel());
- linkify_tags($a, $work, local_channel());
- linkify_tags($a, $education, local_channel());
+ linkify_tags($likes, local_channel());
+ linkify_tags($dislikes, local_channel());
+ linkify_tags($about, local_channel());
+ linkify_tags($interest, local_channel());
+ linkify_tags($interest, local_channel());
+ linkify_tags($contact, local_channel());
+ linkify_tags($channels, local_channel());
+ linkify_tags($music, local_channel());
+ linkify_tags($book, local_channel());
+ linkify_tags($tv, local_channel());
+ linkify_tags($film, local_channel());
+ linkify_tags($romance, local_channel());
+ linkify_tags($work, local_channel());
+ linkify_tags($education, local_channel());
$with = ((x($_POST,'with')) ? escape_tags(trim($_POST['with'])) : '');