aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-20 16:26:33 -0700
committerzotlabs <mike@macgirvin.com>2017-09-20 16:26:33 -0700
commit90f759412b32485b029c2a43f9c01372e9fc83a7 (patch)
tree910e2bc15859b644b8929ba6c69ec6b735ef0e4c /Zotlabs/Lib
parent9e46472ca26f2bd38d2e71c221a9fbf5618b5822 (diff)
downloadvolse-hubzilla-90f759412b32485b029c2a43f9c01372e9fc83a7.tar.gz
volse-hubzilla-90f759412b32485b029c2a43f9c01372e9fc83a7.tar.bz2
volse-hubzilla-90f759412b32485b029c2a43f9c01372e9fc83a7.zip
fix namespace parsing issue
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/ActivityStreams.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php
index 1b9f82ddf..10ae24670 100644
--- a/Zotlabs/Lib/ActivityStreams.php
+++ b/Zotlabs/Lib/ActivityStreams.php
@@ -58,7 +58,7 @@ class ActivityStreams {
$this->saved_recips = $arr;
}
- function collect_recips($base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) {
+ function collect_recips($base = '',$namespace = '') {
$x = [];
$fields = [ 'to','cc','bto','bcc','audience'];
foreach($fields as $f) {
@@ -75,7 +75,7 @@ class ActivityStreams {
return $x;
}
- function expand($arr,$base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) {
+ function expand($arr,$base = '',$namespace = '') {
$ret = [];
// right now use a hardwired recursion depth of 5
@@ -103,8 +103,12 @@ class ActivityStreams {
function get_namespace($base,$namespace) {
+ if(! $namespace)
+ return '';
+
$key = null;
+
foreach( [ $this->data, $base ] as $b ) {
if(! $b)
continue;
@@ -135,7 +139,7 @@ class ActivityStreams {
}
- function get_property_obj($property,$base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV ) {
+ function get_property_obj($property,$base = '',$namespace = '' ) {
$prefix = $this->get_namespace($base,$namespace);
if($prefix === null)
return null;
@@ -158,7 +162,7 @@ class ActivityStreams {
return null;
}
- function get_compound_property($property,$base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) {
+ function get_compound_property($property,$base = '',$namespace = '') {
$x = $this->get_property_obj($property,$base,$namespace);
if($this->is_url($x)) {
$x = $this->fetch_property($x);
@@ -173,7 +177,7 @@ class ActivityStreams {
return false;
}
- function get_primary_type($base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) {
+ function get_primary_type($base = '',$namespace = '') {
if(! $base)
$base = $this->data;
$x = $this->get_property_obj('type',$base,$namespace);