mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:35:14 +00:00
Merge branch 'dev' of /home/macgirvin/osada into dev
This commit is contained in:
commit
d179a7694e
5 changed files with 31 additions and 7 deletions
2
LICENSE
2
LICENSE
|
@ -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
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue