mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-23 01:36:14 -04:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea8d38dec0 | ||
|
|
0fa41f082d | ||
|
|
83b1f62e13 | ||
|
|
b19213b60b | ||
|
|
3c5b18913f | ||
|
|
676a65cd61 | ||
|
|
95fb66b433 | ||
|
|
a57529bc54 | ||
|
|
4f15c08805 | ||
|
|
7b2f4b0814 | ||
|
|
3051e2c268 | ||
|
|
d7489e3913 | ||
|
|
62606bf006 | ||
|
|
c68f2bc2d1 | ||
|
|
f5669c9935 | ||
|
|
9e2bdb012e |
@@ -1,3 +1,11 @@
|
||||
Hubzilla 6.0.1 (2021-07-27)
|
||||
- Fix regression in notification handling introduced in 6.0
|
||||
- Fix regression in regard to unified session page load times introduced in 6.0
|
||||
- Fix photo description textarea only available if create status post enabled
|
||||
- Fix item not found by message id at clone locations
|
||||
- Dismiss deleted xchans in mod chanview
|
||||
|
||||
|
||||
Hubzilla 6.0 (2021-07-09)
|
||||
- Implement swipe to right for bringing in left aside
|
||||
- DB update 1247 to clean up bogus entries in updates
|
||||
|
||||
@@ -17,19 +17,19 @@ class Chanview extends \Zotlabs\Web\Controller {
|
||||
$r = null;
|
||||
|
||||
if($_REQUEST['hash']) {
|
||||
$r = q("select * from xchan where xchan_hash = '%s'",
|
||||
$r = q("select * from xchan where xchan_hash = '%s' and xchan_deleted = 0",
|
||||
dbesc($_REQUEST['hash'])
|
||||
);
|
||||
}
|
||||
if($_REQUEST['address']) {
|
||||
$r = q("select * from xchan where xchan_addr = '%s'",
|
||||
$r = q("select * from xchan where xchan_addr = '%s' and xchan_deleted = 0",
|
||||
dbesc(punify($_REQUEST['address']))
|
||||
);
|
||||
}
|
||||
elseif(local_channel() && intval($_REQUEST['cid'])) {
|
||||
$r = q("SELECT abook.*, xchan.*
|
||||
FROM abook left join xchan on abook_xchan = xchan_hash
|
||||
WHERE abook_channel = %d and abook_id = %d",
|
||||
WHERE abook_channel = %d and abook_id = %d and xchan_deleted = 0",
|
||||
intval(local_channel()),
|
||||
intval($_REQUEST['cid'])
|
||||
);
|
||||
@@ -39,7 +39,7 @@ class Chanview extends \Zotlabs\Web\Controller {
|
||||
// if somebody re-installed they will have more than one xchan, use the most recent name date as this is
|
||||
// the most useful consistently ascending table item we have.
|
||||
|
||||
$r = q("select * from xchan where xchan_url = '%s' order by xchan_name_date desc",
|
||||
$r = q("select * from xchan where xchan_url = '%s' and xchan_deleted = 0 order by xchan_name_date desc",
|
||||
dbesc($_REQUEST['url'])
|
||||
);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ class Chanview extends \Zotlabs\Web\Controller {
|
||||
|
||||
if(array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $_REQUEST['url'] && intval($zf['signature']['header_valid'])) {
|
||||
Libzot::import_xchan($zf['data']);
|
||||
$r = q("select * from xchan where xchan_url = '%s'",
|
||||
$r = q("select * from xchan where xchan_url = '%s' and xchan_deleted = 0",
|
||||
dbesc($_REQUEST['url'])
|
||||
);
|
||||
if($r) {
|
||||
@@ -80,7 +80,7 @@ class Chanview extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
if(! $r) {
|
||||
if(discover_by_webbie($_REQUEST['url'])) {
|
||||
$r = q("select * from xchan where xchan_url = '%s'",
|
||||
$r = q("select * from xchan where xchan_url = '%s' and xchan_deleted = 0",
|
||||
dbesc($_REQUEST['url'])
|
||||
);
|
||||
if($r) {
|
||||
|
||||
@@ -280,16 +280,17 @@ class Item extends Controller {
|
||||
|
||||
|
||||
if(argc() > 1 && argv(1) !== 'drop') {
|
||||
$x = q("select uid, item_wall, llink, mid from item where mid = '%s' or mid = '%s' ",
|
||||
$x = q("select uid, item_wall, llink, mid from item where mid = '%s' or mid = '%s' or uuid = '%s'",
|
||||
dbesc(z_root() . '/item/' . argv(1)),
|
||||
dbesc(z_root() . '/activity/' . argv(1))
|
||||
dbesc(z_root() . '/activity/' . argv(1)),
|
||||
dbesc(argv(1))
|
||||
);
|
||||
if($x) {
|
||||
foreach($x as $xv) {
|
||||
if (intval($xv['item_wall'])) {
|
||||
$c = channelx_by_n($xv['uid']);
|
||||
if ($c) {
|
||||
goaway($c['xchan_url'] . '?mid=' . gen_link_id($xv['mid']));
|
||||
goaway(z_root() . '/channel/' . $c['channel_address'] . '?mid=' . gen_link_id($xv['mid']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,8 +55,13 @@ class Sse_bs extends Controller {
|
||||
self::$xchans = ids_to_querystr($x, 'xchan_hash', true);
|
||||
}
|
||||
|
||||
if(intval(argv(2)) > 0)
|
||||
if(intval(argv(2)) > 0) {
|
||||
self::$offset = argv(2);
|
||||
}
|
||||
else {
|
||||
$_SESSION['sse_loadtime'] = datetime_convert();
|
||||
}
|
||||
|
||||
|
||||
$network = false;
|
||||
$dm = false;
|
||||
@@ -176,7 +181,7 @@ class Sse_bs extends Controller {
|
||||
$sql_extra2
|
||||
ORDER BY created DESC LIMIT $limit OFFSET $offset",
|
||||
intval(self::$uid),
|
||||
dbescdate($_SESSION['page_loadtime']),
|
||||
dbescdate($_SESSION['sse_loadtime']),
|
||||
dbesc(self::$ob_hash)
|
||||
);
|
||||
|
||||
@@ -252,7 +257,7 @@ class Sse_bs extends Controller {
|
||||
$sql_extra2
|
||||
ORDER BY created DESC LIMIT $limit OFFSET $offset",
|
||||
intval(self::$uid),
|
||||
dbescdate($_SESSION['page_loadtime']),
|
||||
dbescdate($_SESSION['sse_loadtime']),
|
||||
dbesc(self::$ob_hash)
|
||||
);
|
||||
|
||||
@@ -328,7 +333,7 @@ class Sse_bs extends Controller {
|
||||
$sql_extra2
|
||||
ORDER BY created DESC LIMIT $limit OFFSET $offset",
|
||||
intval(self::$uid),
|
||||
dbescdate($_SESSION['page_loadtime']),
|
||||
dbescdate($_SESSION['sse_loadtime']),
|
||||
dbesc(self::$ob_hash)
|
||||
);
|
||||
|
||||
@@ -415,7 +420,7 @@ class Sse_bs extends Controller {
|
||||
$sql_extra2
|
||||
ORDER BY created DESC LIMIT $limit OFFSET $offset",
|
||||
intval($sys['channel_id']),
|
||||
dbescdate($_SESSION['page_loadtime']),
|
||||
dbescdate($_SESSION['sse_loadtime']),
|
||||
dbesc(self::$ob_hash),
|
||||
dbescdate($_SESSION['static_loadtime'])
|
||||
);
|
||||
|
||||
@@ -39,8 +39,6 @@ class WebServer {
|
||||
register_shutdown_function('session_write_close');
|
||||
}
|
||||
|
||||
$_SESSION['page_loadtime'] = datetime_convert();
|
||||
|
||||
/**
|
||||
* Language was set earlier, but we can over-ride it in the session.
|
||||
* We have to do it here because the session was just now opened.
|
||||
|
||||
@@ -13,6 +13,8 @@ class Messages {
|
||||
|
||||
$page = self::get_messages_page($options);
|
||||
|
||||
$_SESSION['messages_loadtime'] = datetime_convert();
|
||||
|
||||
$tpl = get_markup_template('messages_widget.tpl');
|
||||
$o = replace_macros($tpl, [
|
||||
'$entries' => $page['entries'],
|
||||
@@ -49,7 +51,7 @@ class Messages {
|
||||
$offset = intval($options['offset']);
|
||||
}
|
||||
|
||||
$loadtime = (($offset) ? $_SESSION['page_loadtime'] : datetime_convert());
|
||||
$loadtime = (($offset) ? $_SESSION['messages_loadtime'] : datetime_convert());
|
||||
|
||||
switch($options['type']) {
|
||||
case 'direct':
|
||||
|
||||
2
boot.php
2
boot.php
@@ -53,7 +53,7 @@ require_once('include/bbcode.php');
|
||||
require_once('include/items.php');
|
||||
|
||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'STD_VERSION', '6.0' );
|
||||
define ( 'STD_VERSION', '6.0.1' );
|
||||
define ( 'ZOT_REVISION', '6.0' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1247 );
|
||||
|
||||
@@ -548,8 +548,10 @@ function markRead(notifType) {
|
||||
$('#nav-' + notifType + '-menu').html('');
|
||||
$('#nav-' + notifType + '-sub').removeClass('show');
|
||||
sessionStorage.removeItem('notification_open');
|
||||
sse_setNotificationsStatus();
|
||||
$(document).trigger('hz:sse_setNotificationsStatus');
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function markItemRead(itemId) {
|
||||
@@ -717,52 +719,18 @@ function updateConvItems(mode,data) {
|
||||
}
|
||||
}
|
||||
|
||||
// take care of the notifications count updates
|
||||
var nmids = $(this).data('b64mids');
|
||||
|
||||
nmids.forEach(function(nmid, index) {
|
||||
|
||||
sse_rmids.push(nmid);
|
||||
|
||||
if($('.notification[data-b64mid=\'' + nmid + '\']').length) {
|
||||
$('.notification[data-b64mid=\'' + nmid + '\']').each(function() {
|
||||
var n = this.parentElement.id.split('-');
|
||||
return sse_updateNotifications(n[1], nmid);
|
||||
});
|
||||
}
|
||||
|
||||
// special handling for forum notifications
|
||||
$('.notification-forum').filter(function() {
|
||||
var fmids = decodeURIComponent($(this).data('b64mids'));
|
||||
var n = this.parentElement.id.split('-');
|
||||
if(fmids.indexOf(nmid) > -1) {
|
||||
var fcount = Number($('.' + n[1] + '-update').html());
|
||||
fcount--;
|
||||
$('.' + n[1] + '-update').html(fcount);
|
||||
if(fcount < 1)
|
||||
$('.' + n[1] + '-button').fadeOut();
|
||||
|
||||
var count = Number($(this).find('.badge-secondary').html());
|
||||
count--;
|
||||
$(this).find('.badge-secondary').html(count);
|
||||
if(count < 1)
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
sse_setNotificationsStatus();
|
||||
$(document).trigger('hz:sse_setNotificationsStatus', [$(this).data('b64mids')]);
|
||||
|
||||
});
|
||||
|
||||
$(window).scrollTop(scroll_position);
|
||||
|
||||
if(followUpPageLoad)
|
||||
sse_bs_counts();
|
||||
else
|
||||
sse_bs_init();
|
||||
if(followUpPageLoad) {
|
||||
$(document).trigger('hz:sse_bs_counts');
|
||||
}
|
||||
else {
|
||||
$(document).trigger('hz:sse_bs_init');
|
||||
}
|
||||
|
||||
if(commentBusy) {
|
||||
commentBusy = false;
|
||||
@@ -902,7 +870,7 @@ function updateInit() {
|
||||
liveUpdate();
|
||||
}
|
||||
else {
|
||||
sse_bs_init();
|
||||
$(document).trigger('hz:sse_bs_init');
|
||||
}
|
||||
|
||||
if($('#live-photos').length || $('#live-cards').length || $('#live-articles').length ) {
|
||||
|
||||
@@ -8,24 +8,11 @@ $(document).ready(function() {
|
||||
UploadInit();
|
||||
}
|
||||
|
||||
//$("#photo-edit-newtag").contact_autocomplete(baseurl + '/acl', 'a', false, function(data) {
|
||||
//$("#photo-edit-newtag").val('@' + data.name);
|
||||
//});
|
||||
|
||||
$(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1");
|
||||
$('textarea').editor_autocomplete(baseurl+"/acl");
|
||||
$('textarea').bbco_autocomplete('bbcode');
|
||||
showHideBodyTextarea();
|
||||
|
||||
});
|
||||
|
||||
function showHideBodyTextarea() {
|
||||
if( $('#id_visible').is(':checked'))
|
||||
$('#body-textarea').slideDown();
|
||||
else
|
||||
$('#body-textarea').slideUp();
|
||||
}
|
||||
|
||||
// initialize
|
||||
function UploadInit() {
|
||||
|
||||
|
||||
@@ -139,6 +139,18 @@
|
||||
|
||||
});
|
||||
|
||||
$(document).on('hz:sse_setNotificationsStatus', function(e, data) {
|
||||
sse_setNotificationsStatus(data);
|
||||
});
|
||||
|
||||
$(document).on('hz:sse_bs_init', function() {
|
||||
sse_bs_init();
|
||||
});
|
||||
|
||||
$(document).on('hz:sse_bs_counts', function() {
|
||||
sse_bs_counts();
|
||||
});
|
||||
|
||||
{{foreach $notifications as $notification}}
|
||||
{{if $notification.filter}}
|
||||
$(document).on('click', '#tt-{{$notification.type}}-only', function(e) {
|
||||
@@ -421,7 +433,7 @@
|
||||
|
||||
}
|
||||
|
||||
function sse_setNotificationsStatus() {
|
||||
function sse_setNotificationsStatus(data) {
|
||||
var primary_notifications = ['dm', 'home', 'intros', 'register', 'notify', 'files'];
|
||||
var secondary_notifications = ['network', 'forums', 'all_events', 'pubs'];
|
||||
var all_notifications = primary_notifications.concat(secondary_notifications);
|
||||
@@ -458,6 +470,39 @@
|
||||
$('#notifications').hide();
|
||||
}
|
||||
|
||||
if (typeof data !== typeof undefined) {
|
||||
data.forEach(function(nmid, index) {
|
||||
|
||||
sse_rmids.push(nmid);
|
||||
|
||||
if($('.notification[data-b64mid=\'' + nmid + '\']').length) {
|
||||
$('.notification[data-b64mid=\'' + nmid + '\']').each(function() {
|
||||
var n = this.parentElement.id.split('-');
|
||||
return sse_updateNotifications(n[1], nmid);
|
||||
});
|
||||
}
|
||||
|
||||
// special handling for forum notifications
|
||||
$('.notification-forum').filter(function() {
|
||||
var fmids = decodeURIComponent($(this).data('b64mids'));
|
||||
var n = this.parentElement.id.split('-');
|
||||
if(fmids.indexOf(nmid) > -1) {
|
||||
var fcount = Number($('.' + n[1] + '-update').html());
|
||||
fcount--;
|
||||
$('.' + n[1] + '-update').html(fcount);
|
||||
if(fcount < 1)
|
||||
$('.' + n[1] + '-button').fadeOut();
|
||||
|
||||
var count = Number($(this).find('.badge-secondary').html());
|
||||
count--;
|
||||
$(this).find('.badge-secondary').html(count);
|
||||
if(count < 1)
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function sse_fallback() {
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
<input id="photos-upload-choose" type="file" name="userfile" />
|
||||
</div -->
|
||||
{{include file="field_input.tpl" field=$caption}}
|
||||
{{include file="field_checkbox.tpl" field=$visible}}
|
||||
<div id="body-textarea">
|
||||
{{include file="field_textarea.tpl" field=$body}}
|
||||
</div>
|
||||
{{include file="field_checkbox.tpl" field=$visible}}
|
||||
<div class="pull-right btn-group">
|
||||
<div class="btn-group">
|
||||
{{if $lockstate}}
|
||||
@@ -40,10 +38,9 @@
|
||||
|
||||
{{if $uploader}}
|
||||
{{include file="field_input.tpl" field=$caption}}
|
||||
{{include file="field_checkbox.tpl" field=$visible}}
|
||||
<div id="body-textarea">
|
||||
{{include file="field_textarea.tpl" field=$body}}
|
||||
</div>
|
||||
{{include file="field_checkbox.tpl" field=$visible}}
|
||||
|
||||
<div id="photos-upload-perms" class="btn-group pull-right">
|
||||
{{if $lockstate}}
|
||||
<button class="btn btn-outline-secondary btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;">
|
||||
|
||||
Reference in New Issue
Block a user