Merge branch 'dev' of /home/macgirvin/osada into dev

This commit is contained in:
zotlabs 2019-01-31 16:29:20 -08:00
commit d179a7694e
5 changed files with 31 additions and 7 deletions

View file

@ -1,4 +1,4 @@
Copyright (c) 2010-2018 Mike Macgirvin
Copyright (c) 2010-2019 Mike Macgirvin
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy

View file

@ -140,6 +140,13 @@ class ThreadItem {
$privacy_warning = true;
}
if($lock && $privacy_warning) {
$lock = t('Privacy conflict. Discretion advised.');
}
$mode = $conv->get_mode();
switch($item['item_type']) {
@ -324,8 +331,8 @@ class ThreadItem {
}
if ($shareable) {
$share = [ t('Share This'), t('share') ];
$embed = [ t('Embed this'), t('embed') ];
$share = t('Repeat This');
$embed = t('Share this');
}
$dreport = '';

View file

@ -643,6 +643,14 @@ function get_item_elements($x,$allow_code = false) {
$arr['sig'] = (($x['signature']) ? htmlspecialchars($x['signature'], ENT_COMPAT,'UTF-8',false) : '');
// fix old-style signatures imported from hubzilla via polling and zot_feed
// so they verify.
if($arr['sig'] && (! strpos($arr['sig'],'.'))) {
$arr['sig'] = 'sha256.' . $arr['sig'];
}
$arr['obj'] = activity_sanitise($x['object']);
$arr['target'] = activity_sanitise($x['target']);
@ -730,6 +738,13 @@ function get_item_elements($x,$allow_code = false) {
}
}
// Strip old-style hubzilla bookmarks
// Do this after signature verification
if(strpos($x['body'],"#^[") !== false) {
$x['body'] = str_replace("#^[","[",$x['body']);
}
// if the input is markdown, remove one level of html escaping.
// It will be re-applied in item_store() and/or item_store_update().
// Do this after signature checking as the original signature

View file

@ -151,12 +151,11 @@
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
{{if $item.share}}
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share}}"></i>{{$item.share}}</a>
{{/if}}
{{if $item.embed}}
<a class="dropdown-item" href="#" onclick="jotEmbed({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-share" title="{{$item.embed.0}}"></i>{{$item.embed.0}}</a>
<a class="dropdown-item" href="#" onclick="jotEmbed({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-share" title="{{$item.embed}}"></i>{{$item.embed}}</a>
{{/if}}
{{if $item.plink}}
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>
{{/if}}

View file

@ -137,7 +137,10 @@
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
{{if $item.share}}
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share}}"></i>{{$item.share}}</a>
{{/if}}
{{if $item.embed}}
<a class="dropdown-item" href="#" onclick="jotEmbed({{$item.id}},{{$item.item_type}}); return false"><i class="generic-icons-nav fa fa-fw fa-share" title="{{$item.embed}}"></i>{{$item.embed}}</a>
{{/if}}
{{if $item.plink}}
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>