Compare commits

..

14 Commits
6.2 ... 6.2.1

Author SHA1 Message Date
Mario
7ba58208f2 version 6.2.1 and changelog 2021-09-16 08:04:59 +00:00
Mario
cc83677711 Merge branch 'master' of https://framagit.org/hubzilla/core 2021-09-16 07:49:43 +00:00
Mario
c28cce1b54 Merge branch 'dev' 2021-09-16 07:48:13 +00:00
Mario
9052695a13 typo 2021-09-15 11:03:19 +00:00
Mario
46b8db53ab provide a get_cached_actor_provider hook and improve the author/owner handling in Libzot::import() 2021-09-15 10:59:16 +00:00
Mario
0b716b3cc7 fix $desturl set to wrong value (null) 2021-09-13 11:36:41 +00:00
Mario
d115e09abc do not process summary in cleanup_bbcode() fixes issue #1612 2021-09-12 17:54:20 +00:00
Mario
0f803aa3ae when updating the channel name from profiles make sure to lookup the xchan entry by xchan_hash since xchan_url is set to the primary location but we might be updating from a clone
(cherry picked from commit e5dc3c05df)
2021-09-10 14:34:21 +02:00
Mario
e5dc3c05df when updating the channel name from profiles make sure to lookup the xchan entry by xchan_hash since xchan_url is set to the primary location but we might be updating from a clone 2021-09-10 12:29:05 +00:00
Mario
1cfe5c3e16 fix spacing issue for collapsed pinned apps with an image
(cherry picked from commit e2d0269b5c)
2021-09-10 10:12:39 +02:00
Mario
e2d0269b5c fix spacing issue for collapsed pinned apps with an image 2021-09-10 08:11:19 +00:00
Mario
b95c61d2c2 fix language selector reloading the page if not clicking the icon exactly and bs5 modal issues
(cherry picked from commit 7b0f8f2896)
2021-09-08 21:50:25 +02:00
Mario
7b0f8f2896 fix language selector reloading the page if not clicking the icon exactly and bs5 modal issues 2021-09-08 19:48:42 +00:00
Mario
25a81ea500 update release date 2021-09-08 07:50:57 +00:00
10 changed files with 74 additions and 31 deletions

View File

@@ -1,3 +1,13 @@
Hubzilla 6.2.1 (2021-09-16)
- Fix regression introduced in 6.2 where Diaspora comments on Hubzilla posts were not relayed
- Fix wrong variable used for refresh under certain conditions
- Fix issue where summary tag was processed in cleanup_bbcode() while it shoud not
- Fix issue where profile name change was not applied if done from non primary location
- Fix spacing issue for collapsed pinned apps with an image
- Fix language selector reloading the page if not clicking exactly the icon
- Fix regression displaying bootstrap modals introduced in 6.2
Hubzilla 6.2 (2021-09-08)
- Deprecate the custom highlight [hl] bbcode in favor of [mark] which is a html5 standard
- Check post_mail permission when receiving a direct message

View File

@@ -3548,7 +3548,21 @@ class Activity {
}
static function get_cached_actor($id) {
return (XConfig::Get($id,'system','actor_record'));
$actor = XConfig::Get($id,'system', 'actor_record');
if ($actor) {
return $actor;
}
// try other get_cached_actor providers (e.g. diaspora)
$hookdata = [
'id' => $id,
'actor' => false
];
call_hooks('get_cached_actor_provider', $hookdata);
return $hookdata['actor'];
}
static function get_actor_hublocs($url, $options = 'all') {

View File

@@ -1200,31 +1200,41 @@ class Libzot {
if (in_array($env['type'], ['activity', 'response'])) {
$r = q("select hubloc_hash, hubloc_network from hubloc where hubloc_id_url = '%s' ",
if(!isset($AS->actor['id'])) {
logger('No actor id!');
return;
}
$r = q("select hubloc_hash, hubloc_network, hubloc_url from hubloc where hubloc_id_url = '%s'",
dbesc($AS->actor['id'])
);
if ($r) {
// selects a zot6 hash if available, otherwise use whatever we have
$r = self::zot_record_preferred($r);
$r = self::zot_record_preferred($r);
$arr['author_xchan'] = $r['hubloc_hash'];
}
if (!$arr['author_xchan']) {
if (! $arr['author_xchan']) {
logger('No author!');
return;
}
$s = q("select hubloc_hash from hubloc where hubloc_id_url = '%s' and hubloc_network = 'zot6' limit 1",
dbesc($env['sender'])
);
$arr['owner_xchan'] = $env['sender'];
// in individual delivery, change owner if needed
if ($s) {
$arr['owner_xchan'] = $s[0]['hubloc_hash'];
if(filter_var($env['sender'], FILTER_VALIDATE_URL)) {
// in individual delivery, change owner if needed
$s = q("select hubloc_hash, hubloc_url from hubloc where hubloc_id_url = '%s' and hubloc_network = 'zot6' limit 1",
dbesc($env['sender'])
);
if ($s) {
$arr['owner_xchan'] = $s[0]['hubloc_hash'];
}
}
else {
$arr['owner_xchan'] = $env['sender'];
if (! $arr['owner_xchan']) {
logger('No owner!');
return;
}
if ($private && (!intval($arr['item_private']))) {
@@ -1714,7 +1724,7 @@ class Libzot {
}
}
$ab = q("select * from abook where abook_channel = %d and abook_xchan = '%s'",
$ab = q("select * from abook where abook_channel = %d and abook_xchan = '%s'",
intval($channel['channel_id']),
dbesc($arr['owner_xchan'])
);
@@ -2636,8 +2646,8 @@ class Libzot {
);
if ($r) {
logger('found another site that is not dead: ' . $r[0]['hubloc_url'], LOGGER_DEBUG, LOG_INFO);
$desturl = $r[0]['hubloc_url'];
logger('found another site that is not dead: ' . $r[0]['hubloc_id_url'], LOGGER_DEBUG, LOG_INFO);
$desturl = $r[0]['hubloc_id_url'];
}
else {
return $hash;
@@ -2745,7 +2755,6 @@ class Libzot {
}
$e = $r[0];
$id = $e['channel_id'];
$sys_channel = (intval($e['channel_system']) ? true : false);

View File

@@ -606,10 +606,10 @@ class Profiles extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
if($namechanged && $is_default) {
$r = q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_url = '%s'",
$r = q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_hash = '%s'",
dbesc($name),
dbesc(datetime_convert()),
dbesc(z_root() . '/channel/' . $channel['channel_address'])
dbesc($channel['xchan_hash'])
);
$r = q("UPDATE channel SET channel_name = '%s' WHERE channel_hash = '%s'",
dbesc($name),

View File

@@ -53,7 +53,7 @@ require_once('include/bbcode.php');
require_once('include/items.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '6.2' );
define ( 'STD_VERSION', '6.2.1' );
define ( 'ZOT_REVISION', '6.0' );
define ( 'DB_UPDATE_VERSION', 1248 );

View File

@@ -3547,6 +3547,7 @@ function cleanup_bbcode($body) {
*/
$body = preg_replace_callback('/\[code(.*?)\[\/(code)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[summary(.*?)\[\/(summary)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[svg(.*?)\[\/(svg)\]/ism','\red_escape_codeblock',$body);
@@ -3560,9 +3561,10 @@ function cleanup_bbcode($body) {
+\,\(\)]+)/ismu", '\red_zrl_callback', $body);
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64summary(.*?)\[\/(summary)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64svg(.*?)\[\/(svg)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64img(.*?)\[\/(img)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64zmg(.*?)\[\/(zmg)\]/ism','\red_unescape_codeblock',$body);

View File

@@ -87,8 +87,8 @@ $(document).ready(function() {
if ( typeof(window.tao.zin) == 'undefined' ) {
tao.zin = { syslc: '', syslcs: {}, htm: '', me: '', debug: '' };
tao.zin.axim = '<div class="zinpax fa fa-sync fa-spin"> </div>';
$('.navbar-app[href*="/lang"]').attr({"data-toggle": "dropdown", "aria-expand": "true", "id": "zintog"})
.removeAttr('href').addClass('zinlcx zinlcxp dropdown dropdown-toggle');
$('.navbar-app[href*="/lang"]').attr({"aria-expand": "true", "id": "zintog"})
.removeAttr('href').addClass('zinlcx zinlcxp dropdown dropdown-toggle').css('cursor','pointer');
$('.dropdown-item[href*="/lang"]').addClass('zinlcxmi zinlcx').removeAttr('href').css('cursor','pointer');
}
$('.zinlcx').on('click', function(e) {
@@ -108,11 +108,11 @@ $(document).ready(function() {
tao.zin.htm += '</ul>';
$('.zinpax').remove();
$('.zinlcx').append(tao.zin.htm);
$('.zinlcxp > ul').addClass('dropdown dropdown-menu dropdown-menu-end').css('left','-16em');
$('.zinlcxp > ul').addClass('dropdown dropdown-menu dropdown-menu-end mt-2 show').css('right', 0);
});
return false;
} else {
if (e.target.id == '') {
if (e.target.id == '' || e.target.id == 'zintog') {
// noop click on lang again
return false;
}

View File

@@ -1 +1,9 @@
<a class="navbar-app nav-link{{if $app.active}} active{{/if}}" href="{{$app.url}}" title="{{$app.name}}" >{{if $icon}}<i class="fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" />{{/if}}<span class="d-lg-none">{{$app.name}}</span></a>
<a class="navbar-app nav-link{{if $app.active}} active{{/if}}" href="{{$app.url}}" title="{{$app.name}}" >
{{if $icon}}
<i class="fa fa-fw fa-{{$icon}}"></i>
<span class="d-lg-none">{{$app.name}}</span>
{{else}}
<img src="{{$app.photo}}" width="16" height="16" />
<div class="d-lg-none d-inline-block" style="margin-left: 9px">{{$app.name}}</div>
{{/if}}
</a>

View File

@@ -185,7 +185,7 @@ var activeCommentText = '';
function jotGetExpiry() {
//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
$('#expiryModal').modal();
$('#expiryModal').modal('show');
$('#expiry-modal-OKButton').on('click', function() {
reply=$('#expiration-date').val();
if(reply && reply.length) {
@@ -197,7 +197,7 @@ var activeCommentText = '';
function jotGetPubDate() {
//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
$('#createdModal').modal();
$('#createdModal').modal('show');
$('#created-modal-OKButton').on('click', function() {
reply=$('#created-date').val();
if(reply && reply.length) {

View File

@@ -323,7 +323,7 @@
wiki_revert_page(compareCommit);
$('#generic-modal-{{$wikiModalID}}').modal('hide');
});
$('#generic-modal-{{$wikiModalID}}').modal();
$('#generic-modal-{{$wikiModalID}}').modal('show');
} else {
window.console.log('Error comparing page.');
}
@@ -364,7 +364,7 @@
});
getPhotoAlbumList();
$('#embedPhotoModalBodyAlbumDialog').off('click');
$('#embedPhotoModal').modal();
$('#embedPhotoModal').modal('show');
};
var choosePhotoFromAlbum = function (album) {