diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Access/PermissionRoles.php | 4 | ||||
-rw-r--r-- | Zotlabs/Lib/Activity.php | 2 | ||||
-rw-r--r-- | Zotlabs/Lib/Apps.php | 6 | ||||
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 2 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Apporder.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Articles.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Cards.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Channel.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Chanview.php | 15 | ||||
-rw-r--r-- | Zotlabs/Module/Directory.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Dirsearch.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 28 | ||||
-rw-r--r-- | Zotlabs/Module/Like.php | 39 | ||||
-rw-r--r-- | Zotlabs/Module/Moderate.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Network.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Photos.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Pubstream.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Register.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Search.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Settings/Display.php | 10 | ||||
-rw-r--r-- | Zotlabs/Module/Wfinger.php | 28 | ||||
-rw-r--r-- | Zotlabs/Module/Z6trans.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Zfinger.php | 3 |
24 files changed, 78 insertions, 95 deletions
diff --git a/Zotlabs/Access/PermissionRoles.php b/Zotlabs/Access/PermissionRoles.php index c8b4953a5..82df0c34b 100644 --- a/Zotlabs/Access/PermissionRoles.php +++ b/Zotlabs/Access/PermissionRoles.php @@ -100,6 +100,7 @@ class PermissionRoles { 'post_mail', 'post_like' , 'republish', 'chat' ]; $ret['limits'] = PermissionLimits::Std_Limits(); + $ret['channel_type'] = 'group'; break; @@ -113,6 +114,7 @@ class PermissionRoles { 'view_pages', 'view_wiki', 'post_wall', 'post_comments', 'tag_deliver', 'post_mail', 'post_like' , 'chat' ]; $ret['limits'] = PermissionLimits::Std_Limits(); + $ret['channel_type'] = 'group'; break; @@ -132,6 +134,7 @@ class PermissionRoles { $ret['limits']['view_storage'] = PERMS_SPECIFIC; $ret['limits']['view_pages'] = PERMS_SPECIFIC; $ret['limits']['view_wiki'] = PERMS_SPECIFIC; + $ret['channel_type'] = 'group'; break; @@ -187,6 +190,7 @@ class PermissionRoles { 'post_mail', 'post_like' , 'republish', 'chat', 'write_wiki' ]; $ret['limits'] = PermissionLimits::Std_Limits(); + $ret['channel_type'] = 'group'; break; diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 014ff8949..d883eac67 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -3042,7 +3042,7 @@ class Activity { } } - if (array_key_exists('source',$act) && array_key_exists('mediaType',$act['source'])) { + if (array_path_exists('source/mediaType',$act) && array_path_exists('source/content',$act)) { if ($act['source']['mediaType'] === 'text/bbcode') { $content['bbcode'] = purify_html($act['source']['content']); } diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index f11bb9628..7b980b8d3 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -564,7 +564,8 @@ class Apps { '$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true), '$pinned' => ((strpos($papp['categories'], 'nav_pinned_app') === false) ? false : true), '$navapps' => (($mode == 'nav') ? true : false), - '$order' => (($mode == 'nav-order') ? true : false), + '$order' => (($mode === 'nav-order' || $mode === 'nav-order-pinned') ? true : false), + '$mode' => $mode, '$add' => t('Add to app-tray'), '$remove' => t('Remove from app-tray'), '$add_nav' => t('Pin to navbar'), @@ -959,9 +960,6 @@ class Apps { if($list) { foreach($list as $li) { $papp = self::app_encode($li); - if($menu !== 'nav_pinned_app' && strpos($papp['categories'],'nav_pinned_app') !== false) - continue; - $syslist[] = $papp; } } diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 5e212ad70..dda6d5d95 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -2908,7 +2908,7 @@ class Libzot { ]; $ret['channel_role'] = get_pconfig($e['channel_id'],'system','permissions_role','custom'); - $ret['protocols'] = [ 'zot', 'zot6' ]; + $ret['protocols'] = [ 'zot6', 'zot' ]; $ret['searchable'] = $searchable; $ret['adult_content'] = $adult_channel; $ret['public_forum'] = $public_forum; diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 426f88688..fadc38b38 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -150,9 +150,11 @@ class ThreadItem { $edpost = false; - if($observer['xchan_hash'] == $this->get_data_value('author_xchan') + if($observer && $observer['xchan_hash'] + && ($observer['xchan_hash'] == $this->get_data_value('author_xchan') || $observer['xchan_hash'] == $this->get_data_value('owner_xchan') - || $this->get_data_value('uid') == local_channel()) + || $observer['xchan_hash'] == $this->get_data_value('source_xchan') + || $this->get_data_value('uid') == local_channel())) $dropping = true; diff --git a/Zotlabs/Module/Apporder.php b/Zotlabs/Module/Apporder.php index eac1abc2d..313c2df50 100644 --- a/Zotlabs/Module/Apporder.php +++ b/Zotlabs/Module/Apporder.php @@ -34,9 +34,9 @@ class Apporder extends \Zotlabs\Web\Controller { foreach($syslist as $app) { if($l === 'nav_pinned_app') { - $navbar_apps[] = Zlib\Apps::app_render($app,'nav-order'); + $navbar_apps[] = Zlib\Apps::app_render($app,'nav-order-pinned'); } - elseif(strpos($app['categories'],'nav_pinned_app') === false) { + else { $nav_apps[] = Zlib\Apps::app_render($app,'nav-order'); } } diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php index 2c43b4764..3f726ebb9 100644 --- a/Zotlabs/Module/Articles.php +++ b/Zotlabs/Module/Articles.php @@ -149,7 +149,7 @@ class Articles extends Controller { } $itemspage = get_pconfig(local_channel(),'system','itemspage'); - App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); + App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 10)); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); diff --git a/Zotlabs/Module/Cards.php b/Zotlabs/Module/Cards.php index 3f0e93de5..c44f7942b 100644 --- a/Zotlabs/Module/Cards.php +++ b/Zotlabs/Module/Cards.php @@ -145,7 +145,7 @@ class Cards extends Controller { $itemspage = get_pconfig(local_channel(),'system','itemspage'); - App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); + App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 10)); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 08de059a8..9c8cddab3 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -334,7 +334,7 @@ class Channel extends Controller { $itemspage = get_pconfig(local_channel(),'system','itemspage'); - App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); + App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 10)); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); if($noscript_content || $load) { diff --git a/Zotlabs/Module/Chanview.php b/Zotlabs/Module/Chanview.php index 2e653d030..20ac41fbe 100644 --- a/Zotlabs/Module/Chanview.php +++ b/Zotlabs/Module/Chanview.php @@ -86,19 +86,8 @@ class Chanview extends \Zotlabs\Web\Controller { } if(! \App::$poi) { - - // We don't know who this is, and we can't figure it out from the URL - // On the plus side, there's a good chance we know somebody else at that - // hub so sending them there with a Zid will probably work anyway. - - $url = ($_REQUEST['url']); - if(! $url) { - notice( t('Channel not found.') . EOL); - return; - } - if($observer) - $url = zid($url); - + notice( t('Channel not found.') . EOL); + return; } $is_zot = false; diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php index 3eafd9f71..e1bf0f6cf 100644 --- a/Zotlabs/Module/Directory.php +++ b/Zotlabs/Module/Directory.php @@ -14,7 +14,7 @@ require_once('include/html2plain.php'); class Directory extends Controller { function init() { - App::set_pager_itemspage(60); + App::set_pager_itemspage(30); if(local_channel() && x($_GET,'ignore')) { q("insert into xign ( uid, xchan ) values ( %d, '%s' ) ", diff --git a/Zotlabs/Module/Dirsearch.php b/Zotlabs/Module/Dirsearch.php index 62af75f4c..c15b13a90 100644 --- a/Zotlabs/Module/Dirsearch.php +++ b/Zotlabs/Module/Dirsearch.php @@ -11,7 +11,7 @@ require_once('include/dir_fns.php'); class Dirsearch extends Controller { function init() { - App::set_pager_itemspage(60); + App::set_pager_itemspage(30); } diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 95359ccad..d8c837522 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -14,6 +14,7 @@ use Zotlabs\Web\HTTPSig; use Zotlabs\Lib\Libzot; use Zotlabs\Lib\Libsync; use Zotlabs\Lib\ThreadListener; +use Zotlabs\Access\PermissionRoles; use App; require_once('include/crypto.php'); @@ -677,6 +678,25 @@ class Item extends Controller { $str_contact_deny = $gacl['deny_cid']; $str_group_deny = $gacl['deny_gid']; + + $groupww = false; + + // if this is a wall-to-wall post to a group, turn it into a direct message + + $role = get_pconfig($profile_uid,'system','permissions_role'); + + $rolesettings = PermissionRoles::role_perms($role); + + $channel_type = isset($rolesettings['channel_type']) ? $rolesettings['channel_type'] : 'normal'; + + $is_group = (($channel_type === 'group') ? true : false); + + if (($is_group) && ($walltowall) && (! $walltowall_comment)) { + $groupww = true; + $str_contact_allow = $owner_xchan['xchan_hash']; + $str_group_allow = ''; + } + $post_tags = []; if($mimetype === 'text/bbcode') { @@ -796,8 +816,6 @@ class Item extends Controller { $i = 0; foreach($match[2] as $mtch) { $reshare = new \Zotlabs\Lib\Share($mtch); - $datarray['obj'] = $reshare->obj(); - $datarray['obj_type'] = $datarray['obj']['type']; $body = str_replace($match[1][$i],$reshare->bbcode(),$body); $i++; } @@ -1233,7 +1251,11 @@ class Item extends Controller { $datarray['llink'] = z_root() . '/display/' . gen_link_id($datarray['mid']); call_hooks('post_local_end', $datarray); - + + if ($groupww) { + $nopush = false; + } + if(! $nopush) Master::Summon([ 'Notifier', $notify_type, $post_id ]); diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php index 61f73bfd5..edd4cfac8 100644 --- a/Zotlabs/Module/Like.php +++ b/Zotlabs/Module/Like.php @@ -210,20 +210,8 @@ class Like extends \Zotlabs\Web\Controller { if(! $plink) $plink = '[zrl=' . z_root() . '/profile/' . $ch[0]['channel_address'] . ']' . $post_type . '[/zrl]'; - $links = array(); - $links[] = array('rel' => 'alternate', 'type' => 'text/html', - 'href' => z_root() . '/profile/' . $ch[0]['channel_address']); - $links[] = array('rel' => 'photo', 'type' => $ch[0]['xchan_photo_mimetype'], - 'href' => $ch[0]['xchan_photo_l']); - - $object = json_encode(array( - 'type' => ACTIVITY_OBJ_PROFILE, - 'title' => $ch[0]['channel_name'], - 'id' => $ch[0]['xchan_url'] . '/' . $ch[0]['xchan_hash'], - 'link' => $links - )); - - + $object = json_encode(Activity::fetch_profile([ 'id' => channel_url($ch[0]) ])); + // second like of the same thing is "undo" for the first like $z = q("select * from likes where channel_id = %d and liker = '%s' and verb = '%s' and target_type = '%s' and target_id = '%s' limit 1", @@ -408,27 +396,8 @@ class Like extends \Zotlabs\Web\Controller { $body = $item['body']; - $object = json_encode(array( - 'type' => $objtype, - 'id' => $item['mid'], - 'asld' => Activity::fetch_item( [ 'id' => $item['mid'] ] ), - 'parent' => (($item['thr_parent']) ? $item['thr_parent'] : $item['parent_mid']), - 'link' => $links, - 'title' => $item['title'], - 'content' => $item['body'], - 'created' => $item['created'], - 'edited' => $item['edited'], - 'author' => array( - 'name' => $item_author['xchan_name'], - 'address' => $item_author['xchan_addr'], - 'guid' => $item_author['xchan_guid'], - 'guid_sig' => $item_author['xchan_guid_sig'], - 'link' => array( - array('rel' => 'alternate', 'type' => 'text/html', 'href' => $item_author['xchan_url']), - array('rel' => 'photo', 'type' => $item_author['xchan_photo_mimetype'], 'href' => $item_author['xchan_photo_m'])), - ), - )); - + $object = json_encode(Activity::fetch_item( [ 'id' => $item['mid'] ])); + if(! intval($item['item_thread_top'])) $post_type = 'comment'; diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php index f1bff3c50..b66b052a6 100644 --- a/Zotlabs/Module/Moderate.php +++ b/Zotlabs/Module/Moderate.php @@ -16,7 +16,7 @@ class Moderate extends \Zotlabs\Web\Controller { return; } - \App::set_pager_itemspage(60); + \App::set_pager_itemspage(30); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start'])); //show all items diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index adfdc011b..fe1aa4386 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -452,7 +452,7 @@ class Network extends \Zotlabs\Web\Controller { } else { $itemspage = get_pconfig(local_channel(),'system','itemspage'); - App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); + App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 10)); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); } diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index fae8c17f6..649e753ad 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -708,7 +708,7 @@ class Photos extends \Zotlabs\Web\Controller { ]); if($x = photos_album_exists($owner_uid, get_observer_hash(), $datum)) { - \App::set_pager_itemspage(60); + \App::set_pager_itemspage(30); $album = $x['display_path']; } else { @@ -1289,7 +1289,7 @@ class Photos extends \Zotlabs\Web\Controller { \App::$page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . \App::$cmd) . '" title="oembed" />' . "\r\n"; - \App::set_pager_itemspage(60); + \App::set_pager_itemspage(30); $r = q("SELECT p.resource_id, p.id, p.filename, p.mimetype, p.album, p.imgscale, p.created, p.display_path FROM photo p diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php index 92ef44696..76a3e0d9e 100644 --- a/Zotlabs/Module/Pubstream.php +++ b/Zotlabs/Module/Pubstream.php @@ -169,7 +169,7 @@ class Pubstream extends \Zotlabs\Web\Controller { $pager_sql = ''; } else { - \App::set_pager_itemspage(20); + \App::set_pager_itemspage(10); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start'])); } diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index bc813f8e1..278cf15ca 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -118,7 +118,7 @@ class Register extends Controller { $invite_code = ((x($_POST,'invite_code')) ? notags(trim($_POST['invite_code'])) : ''); if($using_invites && $invite_code) { - q("delete * from register where hash = '%s'", dbesc($invite_code)); + q("delete from register where hash = '%s'", dbesc($invite_code)); // @FIXME - this also needs to be considered when using 'invites_remaining' in mod/invite.php set_aconfig($result['account']['account_id'],'system','invites_remaining',$num_invites); } diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php index 686afb2d2..d586ae12f 100644 --- a/Zotlabs/Module/Search.php +++ b/Zotlabs/Module/Search.php @@ -159,7 +159,7 @@ class Search extends \Zotlabs\Web\Controller { if(($update) && ($load)) { $itemspage = get_pconfig(local_channel(),'system','itemspage'); - \App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); + \App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 10)); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start'])); // in case somebody turned off public access to sys channel content with permissions diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php index f553fc057..01ae8652a 100644 --- a/Zotlabs/Module/Settings/Display.php +++ b/Zotlabs/Module/Settings/Display.php @@ -36,9 +36,9 @@ class Display { if($browser_update < 10000) $browser_update = 10000; - $itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 20); - if($itemspage > 100) - $itemspage = 100; + $itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 10); + if($itemspage > 30) + $itemspage = 30; set_pconfig(local_channel(),'system','preload_images',$preload_images); @@ -159,7 +159,7 @@ class Display { $browser_update = (($browser_update == 0) ? 80 : $browser_update / 1000); // default if not set: 40 seconds $itemspage = intval(get_pconfig(local_channel(), 'system','itemspage')); - $itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 20); // default if not set: 20 items + $itemspage = (($itemspage > 0 && $itemspage <= 30) ? $itemspage : 10); // default if not set: 10 items $nosmile = get_pconfig(local_channel(),'system','no_smilies'); $nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0 @@ -197,7 +197,7 @@ class Display { '$preload_images' => array('preload_images', t("Preload images before rendering the page"), $preload_images, t("The subjective page load time will be longer but the page will be ready when displayed"), $yes_no), '$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no), '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')), - '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')), + '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 30 items')), '$nosmile' => array('nosmile', t("Show emoticons (smilies) as images"), 1-intval($nosmile), '', $yes_no), '$channel_menu' => [ 'channel_menu', t('Provide channel menu in navigation bar'), get_pconfig(local_channel(),'system','channel_menu',get_config('system','channel_menu',0)), t('Default: channel menu located in app menu'),$yes_no ], '$manual_update' => array('manual_update', t('Manual conversation updates'), channel_manual_conv_update(local_channel()), t('Default is on, turning this off may increase screen jumping'), $yes_no), diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php index a19bdbedc..d24a31a15 100644 --- a/Zotlabs/Module/Wfinger.php +++ b/Zotlabs/Module/Wfinger.php @@ -3,6 +3,7 @@ namespace Zotlabs\Module; require_once('include/zot.php'); +use Zotlabs\Lib\Libzot; class Wfinger extends \Zotlabs\Web\Controller { @@ -128,7 +129,7 @@ class Wfinger extends \Zotlabs\Web\Controller { 'http://webfinger.net/ns/name' => $r[0]['channel_name'], 'http://xmlns.com/foaf/0.1/name' => $r[0]['channel_name'], 'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey'], - 'http://purl.org/zot/federation' => 'zot,zot6' + 'http://purl.org/zot/federation' => 'zot6,zot' ]; foreach($aliases as $alias) @@ -142,7 +143,7 @@ class Wfinger extends \Zotlabs\Web\Controller { [ 'rel' => 'http://webfinger.net/rel/avatar', 'type' => $r[0]['xchan_photo_mimetype'], - 'href' => $r[0]['xchan_photo_l'] + 'href' => $r[0]['xchan_photo_l'] ], [ @@ -162,13 +163,13 @@ class Wfinger extends \Zotlabs\Web\Controller { else { $result['links'] = [ - + [ 'rel' => 'http://webfinger.net/rel/avatar', 'type' => $r[0]['xchan_photo_mimetype'], 'href' => $r[0]['xchan_photo_l'] ], - + [ 'rel' => 'http://microformats.org/profile/hcard', 'type' => 'text/html', @@ -180,12 +181,11 @@ class Wfinger extends \Zotlabs\Web\Controller { 'href' => z_root() ], - [ 'rel' => 'http://webfinger.net/rel/profile-page', 'href' => z_root() . '/profile/' . $r[0]['channel_address'], ], - + [ 'rel' => 'http://schemas.google.com/g/2010#updates-from', 'type' => 'application/atom+xml', @@ -196,16 +196,11 @@ class Wfinger extends \Zotlabs\Web\Controller { 'rel' => 'http://webfinger.net/rel/blog', 'href' => z_root() . '/channel/' . $r[0]['channel_address'], ], - + [ 'rel' => 'http://ostatus.org/schema/1.0/subscribe', 'template' => z_root() . '/follow?f=&url={uri}', ], - - [ - 'rel' => 'http://purl.org/zot/protocol', - 'href' => z_root() . '/.well-known/zot-info' . '?address=' . $r[0]['xchan_addr'], - ], [ 'rel' => 'http://purl.org/zot/protocol/6.0', @@ -214,12 +209,16 @@ class Wfinger extends \Zotlabs\Web\Controller { ], [ + 'rel' => 'http://purl.org/zot/protocol', + 'href' => z_root() . '/.well-known/zot-info' . '?address=' . $r[0]['xchan_addr'], + ], + + [ 'rel' => 'http://purl.org/openwebauth/v1', 'type' => 'application/x-zot+json', 'href' => z_root() . '/owa', ], - [ 'rel' => 'magic-public-key', 'href' => 'data:application/magic-public-key,' . salmon_key($r[0]['channel_pubkey']), @@ -229,7 +228,7 @@ class Wfinger extends \Zotlabs\Web\Controller { if($zot) { // get a zotinfo packet and return it with webfinger - $result['zot'] = zotinfo( [ 'address' => $r[0]['xchan_addr'] ]); + $result['zot'] = Libzot::zotinfo( [ 'address' => $r[0]['xchan_addr'] ]); } } @@ -241,7 +240,6 @@ class Wfinger extends \Zotlabs\Web\Controller { $arr = [ 'channel' => $r[0], 'pchan' => $pchan, 'request' => $_REQUEST, 'result' => $result ]; call_hooks('webfinger',$arr); - json_return_and_die($arr['result'],'application/jrd+json'); } diff --git a/Zotlabs/Module/Z6trans.php b/Zotlabs/Module/Z6trans.php index 98832ad98..58dc09a51 100644 --- a/Zotlabs/Module/Z6trans.php +++ b/Zotlabs/Module/Z6trans.php @@ -119,7 +119,7 @@ class Z6trans extends Controller { 'xconfig' => ['xchan', 'v'], 'xign' => ['xchan'], 'xlink' => ['xlink_xchan', 'xlink_link'], - 'xprof' => ['xprof_hash'], +// 'xprof' => ['xprof_hash'], 'xtag' => ['xtag_hash'], ]; diff --git a/Zotlabs/Module/Zfinger.php b/Zotlabs/Module/Zfinger.php index 3a20144a5..533f0a5db 100644 --- a/Zotlabs/Module/Zfinger.php +++ b/Zotlabs/Module/Zfinger.php @@ -2,6 +2,7 @@ namespace Zotlabs\Module; use Zotlabs\Web\HTTPSig; +use Zotlabs\Lib\Libzot; class Zfinger extends \Zotlabs\Web\Controller { @@ -9,7 +10,7 @@ class Zfinger extends \Zotlabs\Web\Controller { require_once('include/zot.php'); require_once('include/crypto.php'); - + $x = zotinfo($_REQUEST); if($x && $x['guid'] && $x['guid_sig']) { |