From 0f2e991c56c65614f11386534329f7aaa8f5024e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 31 Jan 2019 15:54:37 -0800 Subject: [PATCH 1/2] rename the sharing options and update the license for 2019 --- LICENSE | 2 +- Zotlabs/Lib/ThreadItem.php | 4 ++-- include/items.php | 15 +++++++++++++++ view/tpl/conv_item.tpl | 5 ++--- view/tpl/conv_list.tpl | 5 ++++- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/LICENSE b/LICENSE index 89f173d2b..dd90a7735 100644 --- a/LICENSE +++ b/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 diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 0b4e53495..8031219fa 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -324,8 +324,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 = ''; diff --git a/include/items.php b/include/items.php index 9e2be9671..ff2fa72d8 100755 --- a/include/items.php +++ b/include/items.php @@ -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 diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index f41f3e700..829d89bae 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -151,12 +151,11 @@