diff options
author | zotlabs <mike@macgirvin.com> | 2017-09-20 22:28:52 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-09-20 22:28:52 -0700 |
commit | 4372e1fcda6bf92da881d1712f05aa18f321bdba (patch) | |
tree | 1b0b97a7c5bc2b66dd074fa0efa5e7625ae5a986 /Zotlabs | |
parent | 4ae503bef7e54601bf665e96a2af269d95a54e82 (diff) | |
parent | 15691d3ced329dd8d6aa2c4fa7ca1ec1886a1c70 (diff) | |
download | volse-hubzilla-4372e1fcda6bf92da881d1712f05aa18f321bdba.tar.gz volse-hubzilla-4372e1fcda6bf92da881d1712f05aa18f321bdba.tar.bz2 volse-hubzilla-4372e1fcda6bf92da881d1712f05aa18f321bdba.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 2 | ||||
-rw-r--r-- | Zotlabs/Lib/ActivityStreams.php | 10 | ||||
-rw-r--r-- | Zotlabs/Lib/LDSignatures.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Channel.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Connedit.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Wiki.php | 3 | ||||
-rw-r--r-- | Zotlabs/Widget/Common_friends.php | 19 | ||||
-rw-r--r-- | Zotlabs/Widget/Wiki_pages.php | 7 |
8 files changed, 42 insertions, 11 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 54d609ad1..5f8490b06 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -161,7 +161,7 @@ class Notifier { $packet_type = 'keychange'; $normal_mode = false; } - elseif($cmd == 'permission_update' || $cmd == 'permission_reject' || $cmd == 'permission_accept' || $cmd == 'permission_create') { + elseif(in_array($cmd, [ 'permission_update', 'permission_reject', 'permission_accept', 'permission_create' ])) { // Get the (single) recipient $r = q("select * from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_self = 0", intval($item_id) diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php index d9735881a..1b9f82ddf 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 = 'https://www.w3.org/ns/activitystreams') { + function collect_recips($base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) { $x = []; $fields = [ 'to','cc','bto','bcc','audience']; foreach($fields as $f) { @@ -75,7 +75,7 @@ class ActivityStreams { return $x; } - function expand($arr,$base = '',$namespace = 'https://www.w3.org/ns/activitystreams') { + function expand($arr,$base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) { $ret = []; // right now use a hardwired recursion depth of 5 @@ -135,7 +135,7 @@ class ActivityStreams { } - function get_property_obj($property,$base = '',$namespace = 'https://www.w3.org/ns/activitystreams') { + function get_property_obj($property,$base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV ) { $prefix = $this->get_namespace($base,$namespace); if($prefix === null) return null; @@ -158,7 +158,7 @@ class ActivityStreams { return null; } - function get_compound_property($property,$base = '',$namespace = 'https://www.w3.org/ns/activitystreams') { + function get_compound_property($property,$base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) { $x = $this->get_property_obj($property,$base,$namespace); if($this->is_url($x)) { $x = $this->fetch_property($x); @@ -173,7 +173,7 @@ class ActivityStreams { return false; } - function get_primary_type($base = '',$namespace = 'https://www.w3.org/ns/activitystreams') { + function get_primary_type($base = '',$namespace = ACTIVITYSTREAMS_JSONLD_REV) { if(! $base) $base = $this->data; $x = $this->get_property_obj('type',$base,$namespace); diff --git a/Zotlabs/Lib/LDSignatures.php b/Zotlabs/Lib/LDSignatures.php index fa2758044..31ffd71f1 100644 --- a/Zotlabs/Lib/LDSignatures.php +++ b/Zotlabs/Lib/LDSignatures.php @@ -35,7 +35,9 @@ class LDSignatures { $options['signatureValue'] = base64_encode(rsa_sign($ohash . $dhash,$channel['channel_prvkey'])); $signed = array_merge([ - '@context' => [ 'https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1' ], + '@context' => [ + ACTIVITYSTREAMS_JSONLD_REV, + 'https://w3id.org/security/v1' ], ],$options); return $signed; @@ -82,6 +84,8 @@ class LDSignatures { if(! is_object($data)) return ''; + jsonld_set_document_loader('jsonld_document_loader'); + return jsonld_normalize($data,[ 'algorithm' => 'URDNA2015', 'format' => 'application/nquads' ]); } diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 4ffc9ffc6..8550c69cd 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -123,7 +123,7 @@ class Channel extends \Zotlabs\Web\Controller { //$o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']); - $o .= common_friends_visitor_widget(\App::$profile['profile_uid']); + // $o .= common_friends_visitor_widget(\App::$profile['profile_uid']); if($channel && $is_owner) { $channel_acl = array( diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index 0f18b432d..23c5282e3 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -248,6 +248,10 @@ class Connedit extends \Zotlabs\Web\Controller { notice( t('Failed to update connection record.') . EOL); if(! intval(\App::$poi['abook_self'])) { + if($new_friend) { + \Zotlabs\Daemon\Master::Summon( [ 'Notifier', 'permission_accept', $contact_id ] ); + } + \Zotlabs\Daemon\Master::Summon( [ 'Notifier', (($new_friend) ? 'permission_create' : 'permission_update'), diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 2668229ee..fe2bfbdfb 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -216,7 +216,8 @@ class Wiki extends \Zotlabs\Web\Controller { '$deny_cid' => $x['deny_cid'], '$deny_gid' => $x['deny_gid'], '$typelock' => array('typelock', t('Lock content type'), '', '', array(t('No'), t('Yes'))), - '$notify' => array('postVisible', t('Create a status post for this wiki'), '', '', array(t('No'), t('Yes'))) + '$notify' => array('postVisible', t('Create a status post for this wiki'), '', '', array(t('No'), t('Yes'))), + '$edit_wiki_name' => t('Edit Wiki Name') )); return $o; diff --git a/Zotlabs/Widget/Common_friends.php b/Zotlabs/Widget/Common_friends.php new file mode 100644 index 000000000..a67b9312c --- /dev/null +++ b/Zotlabs/Widget/Common_friends.php @@ -0,0 +1,19 @@ +<?php + +namespace Zotlabs\Widget; + +require_once('include/contact_widgets.php'); + +class Common_friends { + + function widget($arr) { + + if((! \App::$profile['profile_uid']) + || (! perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),'view_contacts'))) { + return ''; + } + + return common_friends_visitor_widget(\App::$profile['profile_uid']); + + } +} diff --git a/Zotlabs/Widget/Wiki_pages.php b/Zotlabs/Widget/Wiki_pages.php index f98081da0..ac44b8d88 100644 --- a/Zotlabs/Widget/Wiki_pages.php +++ b/Zotlabs/Widget/Wiki_pages.php @@ -53,9 +53,12 @@ class Wiki_pages { '$addnew' => t('Add new page'), '$typelock' => $typelock, '$lockedtype' => $w['mimeType'], - '$mimetype' => mimetype_select(0,$w['mimeType'], [ 'text/markdown','text/bbcode', 'text/plain' ]), + '$mimetype' => mimetype_select(0,$w['mimeType'], + [ 'text/markdown' => t('Markdown'), 'text/bbcode' => t('BBcode'), 'text/plain' => t('Text') ]), '$pageName' => array('pageName', t('Page name')), - '$refresh' => $arr['refresh'] + '$refresh' => $arr['refresh'], + '$options' => t('Options'), + '$submit' => t('Submit') )); } } |