Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge

This commit is contained in:
zotlabs 2017-10-19 16:27:24 -07:00
commit cdb1bc9be6
10 changed files with 1875 additions and 1473 deletions

111
CHANGELOG
View file

@ -1,3 +1,114 @@
Hubzilla 2.8 (????-??-??)
- Redirect to be moderated items to /moderate
- Update notifications if notifications area remains open
- Create an actual logout module instead of relying on internal variables
- Add local_channel as a comanche condition variable
- Implement possibility to pin app-tray apps in the navbar via app category navbar_default
- Introduce custom navbars
- Re-implement single delivery
- Pdledit usability improvements
- Implement next generation notifications in right aside
- Implement single post view for /pubstream
- Make anonymous comments work in mod display
- Introduce notifications for unseen public stream posts (off by default)
- Preperatory work on Zot VI
- Add app for site admin
- Introduce experimental alternate channel_menu navigation (off by default)
- Introduce notifications for shared files
- Bring back notifications for account approvals
- Urlencode hashes from mod_acl
- Don't use chanlink_url() for feed mentions
- Design common friends widget to fit better in the app and move it to left aside
- Allow navbar to be used when cover photo is displayed in mod channel
- Implement admin setting to use imagick converter for large photos
- Process activity deletes from OStatus which for whatever reason do not use the industry standard tombstone mechanism
- Implement new css based spinner
- Move the link header initialisation from Router to Webserver
⁻ Extend activity_match() to work with arrays
- Updated the trusted CA cert database
- Ostatus - support likes of comments
- Provide ability to mention a forum by using !forumname as well as the traditional red style (@forumname+)
- Encrypt delivery reports (not backward compatible)
- Provide a space between link header params (draft-cavage-http-signatures-08)
- Turn common_friends into a widget
- Update to jquery-3.2.1
- Wiki pages sorted by name
- Create new hooks for permissions_accept and permissions_reject
- Provide rel=alternate link if no reshare content in post
- Add remote login button to login page
- DB update to add index to item.resource_id
- Implement wiki editing (name and acl)
- Provide a hook for importing a channel photo at channel creation time
- Implement wiki mimetype lock
- Bring back wiki downloads
- Add text/plain mimetype to wiki
- Implement per page mimetype selection for wikis
- Added english context help for apps and appman
- Implement owa (open web auth)
- Ignore diaspora_meta column on item import
- Check code permissions on cloud files
- Remove period from characters allowed in username
- Make comment highlighting more reliable
- Sign zot-info packets with httpsignatures
- Implement server to server magic auth
- Provide support for json-ld signatures
- Rewrite comment form open/close handling to be more reliable
- Radically reduce code duplication in updateConvItems()
- Remove discover tab in favour of the public stream app
- Apply autotime to all autotime classed elements when static loading a page
- Implement cards feature
- Extended support for help page translations including table of contents files at the top level
- Introduce util/dmkdir - a mkdir tool for DAV
- Various doco improvements
- Introduce util/dcp (DAV-copy) - copy file or directory from local system to Hubzilla
- Provide support for HTTPsig
- Implement mechanism for selective network following in protocol connectors (diaspora, ostatus, activitypub, zot, rss)
Bugfixes
- Fix w2w posts not removed in contact_remove() - github issue #837
- Fix guests not having a unique (non-existent) url
- Fix mod register re-using the password
- Fix write_storage permission not checked in /display
- Fix discovery of moderated items in enotify
- Fix profile thing image not deleted when thing deleted - github issue #868
- Fix deletions to comments not synced on wall posts
- Fix community tags not preserved on post edit - github issue #865
- Fix profile photo propagation issue if the local xchan_photo_[l|m|s] fields were changed from the /photo/profile/l/n form to photo/[hash] form by a clone operation
- Fix lockstate and current permissions not handed over to editor in mod card_edit
- Fix profile edit dropdown for multiple profiles
- Fix affinity slider spinner
- Fix mod pubsites broken
- Fix directory server admin selection includes known dead sites
- Fix sticky-kit issue where the bottom of left aside was not visible when section content was short
- Fix possibility to set bogus my_address
- Fix deleting of wiki pages
- Fix selected theme not appearing selected after change - github issue #855
- Fix an issue where some encoded mids were not found in /display
- Fix issue with mentions and xchans with @ or /
- Fix webfinger returns invalid XML - github issue #851
- Fix last remaining task in tasklist was not removed from view when completed
Plugins/Addon
Hubwall: Remove errant $1 string in sender name
Map federation protocols for zotinfo
Gnusoc: force ostatus profile photos to get refreshed monthly
Gnusoc: fix ostatus mention notifications
Gnusoc: unsubscribe to gnusoc feeds if connector is disabled
Phpmailer: not using load/unload
Gnusoc: don't provide some information if gnusoc is disabled by the channel
Diaspora: add a predelivery interval
Diaspora: support for likes on comments
Introduce the pubcrawl plugin - an unapologetically non-compliant ActivityPub Protocol implemention
Introduce gravatar plugin
Pubsubhubbub: produce much more compact PuSH feeds
Diaspora: support text comments on reshare posts
Diaspora: changes to delivery scenarios for the special handling of profile messages
Diaspora: put diaspora seed_location in json webfinger
Gnusoc: fix mis-attributed comments from mastodon
Gnusoc: allow discovery by url (not just reddress) and permit upgrade from 'unknown' network to gnusoc
Implement mechanism for selective network following in protocol connectors
Hubzilla 2.6.3 (2017-09-18)
- Fix anonymous comments/likes on photos - this is not yet implemented
- Fix favicon not displayed on certain pages

View file

@ -89,13 +89,18 @@ class Display extends \Zotlabs\Web\Controller {
if($decoded)
$item_hash = $decoded;
$r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted from item where mid like '%s' limit 1",
$r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, item_blocked from item where mid like '%s' limit 1",
dbesc($item_hash . '%')
);
if($r) {
$target_item = $r[0];
}
//if the item is to be moderated redirect to /moderate
if($target_item['item_blocked'] == ITEM_MODERATED) {
goaway(z_root() . '/moderate/' . $target_item['id']);
}
$r = null;

View file

@ -14,6 +14,24 @@ class Moderate extends \Zotlabs\Web\Controller {
return;
}
//show all items
if(argc() == 1) {
$r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60",
intval(local_channel()),
intval(ITEM_MODERATED)
);
}
//show a single item
if(argc() == 2) {
$post_id = intval(argv(1));
$r = q("select item.id as item_id, item.* from item where item.id = %d and item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60",
intval($post_id),
intval(local_channel()),
intval(ITEM_MODERATED)
);
}
if(argc() > 2) {
$post_id = intval(argv(1));
@ -55,10 +73,6 @@ class Moderate extends \Zotlabs\Web\Controller {
goaway(z_root() . '/moderate');
}
}
$r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60",
intval(local_channel()),
intval(ITEM_MODERATED)
);
if($r) {
xchan_query($r);

View file

@ -49,7 +49,7 @@ require_once('include/hubloc.php');
require_once('include/attach.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '2.7.6' );
define ( 'STD_VERSION', '2.9' );
define ( 'ZOT_REVISION', '1.3' );
define ( 'DB_UPDATE_VERSION', 1196 );

View file

@ -369,7 +369,8 @@ function contact_remove($channel_id, $abook_id) {
return false;
$r = q("select * from item where author_xchan = '%s' and uid = %d",
$r = q("select * from item where (owner_xchan = '%s' or author_xchan = '%s') and uid = %d",
dbesc($abook['abook_xchan']),
dbesc($abook['abook_xchan']),
intval($channel_id)
);

View file

@ -703,7 +703,9 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
$is_new = true;
$conv_link = (($item['item_type'] == ITEM_TYPE_CARD) ? $item['plink'] : z_root() . '/display/' . gen_link_id($item['mid']));
$conv_link_mid = (($mode == 'moderate') ? $item['parent_mid'] : $item['mid']);
$conv_link = (($item['item_type'] == ITEM_TYPE_CARD) ? $item['plink'] : z_root() . '/display/' . gen_link_id($conv_link_mid));
$tmp_item = array(

File diff suppressed because it is too large Load diff

View file

@ -415,6 +415,7 @@ function NavUpdate() {
var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : '');
$.get(pingCmd,function(data) {
if(data.invalid == 1) {
window.location.href=window.location.href;
}
@ -440,71 +441,35 @@ function NavUpdate() {
updateCountsOnly = false;
if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) {
$('#notifications-btn, #notifications-btn-1').css('opacity', 1);
$('#notifications-btn').css('opacity', 1);
}
else {
$('#notifications-btn, #notifications-btn-1').css('opacity', 0.5);
$('#notifications-btn').css('opacity', 0.5);
$('#navbar-collapse-1').removeClass('show');
}
if(data.network == 0) {
data.network = '';
$('.network-update, .network-button').hide();
document.title = savedTitle;
} else {
$('.network-update, .network-button').show();
document.title = '(' + data.network + ') ' + savedTitle;
if(data.home || data.intros || data.register || data.mail || data.notify || data.files) {
$('#notifications-btn-icon').removeClass('fa-exclamation-circle');
$('#notifications-btn-icon').addClass('fa-exclamation-triangle');
}
$('.network-update').html(data.network);
if(data.pubs == 0) {
data.pubs = '';
$('.pubs-update, .pubs-button').hide();
} else {
$('.pubs-update, .pubs-button').show();
if(!data.home && !data.intros && !data.register && !data.mail && !data.notify && !data.files) {
$('#notifications-btn-icon').removeClass('fa-exclamation-triangle');
$('#notifications-btn-icon').addClass('fa-exclamation-circle');
}
$('.pubs-update').html(data.pubs);
if(data.files == 0) {
data.files = '';
$('.files-update, .files-button').hide();
} else {
$('.files-update, .files-button').show();
}
$('.files-update').html(data.files);
$.each(data, function(index, item) {
//do not process those
var arr = ['notice', 'info', 'invalid'];
if(arr.indexOf(index) !== -1)
return;
if(data.home == 0) { data.home = ''; $('.home-update, .home-button').hide(); } else { $('.home-update, .home-button').show(); }
$('.home-update').html(data.home);
if(data.intros == 0) { data.intros = ''; $('.intros-update, .intros-button').hide(); } else { $('.intros-update, .intros-button').show(); }
$('.intros-update').html(data.intros);
if(data.mail == 0) { data.mail = ''; $('.mail-update, .mail-button').hide(); } else { $('.mail-update, .mail-button').show(); }
$('.mail-update').html(data.mail);
if(data.notify == 0) { data.notify = ''; $('.notify-update, .notify-button').hide(); } else { $('.notify-update, .notify-button').show(); }
$('.notify-update').html(data.notify);
if(data.register == 0) { data.register = ''; $('.register-update, .register-button').hide(); } else { $('.register-update, .register-button').show(); }
$('.register-update').html(data.register);
if(data.events == 0) { data.events = ''; $('.events-update, .events-button').hide(); } else { $('.events-update, .events-button').show(); }
$('.events-update').html(data.events);
if(data.events_today == 0) { data.events_today = ''; $('.events-today-update').removeClass('show'); } else { $('.events-today-update').addClass('show'); $('.events-update').html(data.events + '*'); }
$('.events-today-update').html(data.events_today);
if(data.birthdays == 0) { data.birthdays = ''; $('.birthdays-update').removeClass('show'); } else { $('.birthdays-update').addClass('show'); }
$('.birthdays-update').html(data.birthdays);
if(data.birthdays_today == 0) { data.birthdays_today = ''; $('.birthdays-today-update').removeClass('show'); } else { $('.birthdays-today-update').addClass('show'); $('.birthdays-update').html(data.birthdays + '*'); }
$('.birthdays-today-update').html(data.birthdays_today);
if(data.all_events == 0) { data.all_events = ''; $('.all_events-update, .all_events-button').hide(); } else { $('.all_events-update, .all_events-button').show(); }
$('.all_events-update').html(data.all_events);
if(data.all_events_today == 0) { data.all_events_today = ''; $('.all_events-today-update').removeClass('show'); } else { $('.all_events-today-update').addClass('show'); $('.all_events-update').html(data.all_events + '*'); }
$('.all_events-today-update').html(data.all_events_today);
if(item == 0) {
$('.' + index + '-button').hide();
} else {
$('.' + index + '-button').show();
$('.' + index + '-update').html(item);
}
});
$.jGrowl.defaults.closerTemplate = '<div>[ ' + aStr.closeAll + ']</div>';
@ -979,26 +944,21 @@ function notify_popup_loader(notifyType) {
window.location.href=window.location.href;
}
if(data.notify.length == 0){
$("#navbar-" + notifyType + "-menu").html(aStr[nothingnew]);
$("#nav-" + notifyType + "-menu").html(aStr[nothingnew]);
} else {
$("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark);
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
$("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark);
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
$(data.notify).each(function() {
html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass);
$("#navbar-" + notifyType + "-menu").append(html);
$(data.notify).each(function() {
html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass);
$("#navbar-" + notifyType + "-menu").append(html);
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass);
$("#nav-" + notifyType + "-menu").append(html);
});
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass);
$("#nav-" + notifyType + "-menu").append(html);
});
$(".dropdown-menu img[data-src], .notification img[data-src]").each(function(i, el){
// Replace data-src attribute with src attribute for every image
$(el).attr('src', $(el).data("src"));
$(el).removeAttr("data-src");
});
}
$(".dropdown-menu img[data-src], .notification img[data-src]").each(function(i, el){
// Replace data-src attribute with src attribute for every image
$(el).attr('src', $(el).data("src"));
$(el).removeAttr("data-src");
});
});
setTimeout(function() {

View file

@ -74,7 +74,7 @@
</button>
{{if $localuser || $nav.pubs}}
<button id="notifications-btn" type="button" class="navbar-toggler border-0 text-white">
<i class="fa fa-exclamation-circle"></i>
<i id="notifications-btn-icon" class="fa fa-exclamation-circle"></i>
</button>
{{/if}}
<button id="menu-btn" class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2">

View file

@ -88,7 +88,7 @@
{{if $localuser || $nav.pubs}}
<button id="notifications-btn" type="button" class="navbar-toggler border-0 text-white" data-toggle="collapse" data-target="#navbar-collapse-1">
<i class="fa fa-exclamation"></i>
<i id="notifications-btn-icon" class="fa fa-exclamation"></i>
</button>
{{/if}}