aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php1
-rw-r--r--Zotlabs/Module/Search.php14
2 files changed, 10 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index c56d73421..bab70997e 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1096,7 +1096,6 @@ class Activity {
call_hooks('encode_person', $arr);
$ret = $arr['encoded'];
-
return $ret;
}
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index 95510c349..eeeff9613 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -58,15 +58,13 @@ class Search extends Controller {
$o .= search($search, 'search-box', '/search', ((local_channel()) ? true : false));
- if (local_channel() && strpos($search, 'https://') === 0) {
+ if (local_channel() && strpos($search, 'https://') === 0 && !$update && !$load) {
$j = Activity::fetch($search, App::get_channel());
if ($j) {
$AS = new ActivityStreams($j);
-
if ($AS->is_valid()) {
// check if is_an_actor, otherwise import activity
if (is_array($AS->obj) && !ActivityStreams::is_an_actor($AS->obj)) {
- // The boolean flag enables html cache of the item
$item = Activity::decode_note($AS);
if ($item) {
logger('parsed_item: ' . print_r($item, true), LOGGER_DATA);
@@ -76,6 +74,14 @@ class Search extends Controller {
}
}
}
+ else {
+ // try other fetch providers (e.g. diaspora)
+ $hookdata = [
+ 'channel' => App::get_channel(),
+ 'data' => $search
+ ];
+ call_hooks('fetch_provider', $hookdata);
+ }
}
if (strpos($search, '#') === 0) {
@@ -120,7 +126,7 @@ class Search extends Controller {
// Here is the way permissions work in the search module...
// Only public posts can be shown
// OR your own posts if you are a logged in member
- // No items will be shown if the member has a blocked profile wall.
+ // No items will be shown if the member has a blocked profile wall.
if ((!$update) && (!$load)) {