Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
This commit is contained in:
commit
4adf2caaa6
@ -1,3 +1,7 @@
|
||||
Hubzilla 2.6.2 (2017-08-31)
|
||||
- Fix webfinger returns invalid XML (github issue #851)
|
||||
|
||||
|
||||
Hubzilla 2.6.1 (2017-08-18)
|
||||
- Fix a regression with dav clients
|
||||
- Raise install requirements
|
||||
|
@ -169,6 +169,7 @@ class Channel extends \Zotlabs\Web\Controller {
|
||||
*/
|
||||
|
||||
$item_normal = item_normal();
|
||||
$item_normal_update = item_normal_update();
|
||||
$sql_extra = item_permissions_sql(\App::$profile['profile_uid']);
|
||||
|
||||
if(get_pconfig(\App::$profile['profile_uid'],'system','channel_list_mode') && (! $mid))
|
||||
@ -193,12 +194,12 @@ class Channel extends \Zotlabs\Web\Controller {
|
||||
$simple_update = '';
|
||||
|
||||
if($static && $simple_update)
|
||||
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
|
||||
$simple_update .= " and item_thread_top = 1 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
|
||||
|
||||
if(($update) && (! $load)) {
|
||||
|
||||
if($mid) {
|
||||
$r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal
|
||||
$r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal_update
|
||||
AND item_wall = 1 $simple_update $sql_extra limit 1",
|
||||
dbesc($mid . '%'),
|
||||
intval(\App::$profile['profile_uid'])
|
||||
@ -208,7 +209,7 @@ class Channel extends \Zotlabs\Web\Controller {
|
||||
else {
|
||||
$r = q("SELECT distinct parent AS item_id, created from item
|
||||
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
|
||||
WHERE uid = %d $item_normal
|
||||
WHERE uid = %d $item_normal_update
|
||||
AND item_wall = 1 $simple_update
|
||||
AND (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||
$sql_extra
|
||||
@ -241,7 +242,7 @@ class Channel extends \Zotlabs\Web\Controller {
|
||||
|
||||
if($load || ($checkjs->disabled())) {
|
||||
if($mid) {
|
||||
$r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal
|
||||
$r = q("SELECT distinct parent AS item_id from item where mid like '%s' and uid = %d $item_normal
|
||||
AND item_wall = 1 $sql_extra limit 1",
|
||||
dbesc($mid . '%'),
|
||||
intval(\App::$profile['profile_uid'])
|
||||
|
@ -185,6 +185,7 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
|
||||
$observer_hash = get_observer_hash();
|
||||
$item_normal = item_normal();
|
||||
$item_normal_update = item_normal_update();
|
||||
|
||||
$sql_extra = public_permissions_sql($observer_hash);
|
||||
|
||||
@ -251,7 +252,7 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
$r = q("SELECT item.parent AS item_id from item
|
||||
WHERE uid = %d
|
||||
and parent_mid = '%s'
|
||||
$item_normal
|
||||
$item_normal_update
|
||||
$simple_update
|
||||
limit 1",
|
||||
intval(local_channel()),
|
||||
@ -275,7 +276,7 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
and uid in ( " . stream_perms_api_uids(($observer_hash) ? (PERMS_NETWORK|PERMS_PUBLIC) : PERMS_PUBLIC) . " ))
|
||||
OR uid = %d )
|
||||
$sql_extra )
|
||||
$item_normal
|
||||
$item_normal_update
|
||||
$simple_update
|
||||
limit 1",
|
||||
dbesc($target_item['parent_mid']),
|
||||
|
@ -44,6 +44,7 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
|
||||
$channel = \App::get_channel();
|
||||
$item_normal = item_normal();
|
||||
$item_normal_update = item_normal_update();
|
||||
|
||||
$datequery = $datequery2 = '';
|
||||
|
||||
@ -480,7 +481,7 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
// this is an update
|
||||
$r = q("SELECT item.parent AS item_id FROM item
|
||||
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
|
||||
WHERE true $uids $item_normal $simple_update
|
||||
WHERE true $uids $item_normal_update $simple_update
|
||||
and (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||
$sql_extra3 $sql_extra $sql_nets "
|
||||
);
|
||||
|
@ -21,6 +21,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
|
||||
$item_normal = item_normal();
|
||||
$item_normal_update = item_normal_update();
|
||||
|
||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||
|
||||
@ -134,7 +135,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
|
||||
$r = q("SELECT distinct item.id AS item_id, $ordering FROM item
|
||||
left join abook on item.author_xchan = abook.abook_xchan
|
||||
WHERE true $uids $item_normal
|
||||
WHERE true $uids $item_normal_update
|
||||
AND item.parent = item.id $simple_update
|
||||
and (abook.abook_blocked = 0 or abook.abook_flags is null)
|
||||
$sql_extra3 $sql_extra $sql_nets"
|
||||
|
@ -25,6 +25,7 @@ class Helpindex {
|
||||
|
||||
|
||||
// TODO: Implement support for translations in hierarchical table of content files
|
||||
/*
|
||||
if(argc() > 2) {
|
||||
$path = '';
|
||||
for($x = 1; $x < argc(); $x ++) {
|
||||
@ -36,6 +37,7 @@ class Helpindex {
|
||||
$levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$y);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if($level_0)
|
||||
$o .= $level_0;
|
||||
|
2
boot.php
2
boot.php
@ -52,7 +52,7 @@ define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'STD_VERSION', '2.7.2' );
|
||||
define ( 'ZOT_REVISION', '1.3' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1193 );
|
||||
define ( 'DB_UPDATE_VERSION', 1194 );
|
||||
|
||||
define ( 'PROJECT_BASE', __DIR__ );
|
||||
|
||||
|
@ -28,16 +28,22 @@ function get_help_content($tocpath = false) {
|
||||
}
|
||||
|
||||
if($path) {
|
||||
|
||||
$title = basename($path);
|
||||
if(! $tocpath)
|
||||
\App::$page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags($title)));
|
||||
|
||||
// Check that there is a "toc" or "sitetoc" located at the specified path.
|
||||
// If there is not, then there was not a translation of the table of contents
|
||||
// available and so default back to the English TOC at /doc/toc.{html,bb,md}
|
||||
// TODO: This is incompatible with the hierarchical TOC construction
|
||||
// defined in /Zotlabs/Widget/Helpindex.php.
|
||||
if($tocpath !== false &&
|
||||
load_doc_file('doc/' . $path . '.md') === '' &&
|
||||
load_doc_file('doc/' . $path . '.bb') === '' &&
|
||||
load_doc_file('doc/' . $path . '.html') === ''
|
||||
) {
|
||||
$path = 'toc';
|
||||
$path = $title;
|
||||
}
|
||||
$text = load_doc_file('doc/' . $path . '.md');
|
||||
|
||||
|
@ -182,6 +182,12 @@ function item_normal_search() {
|
||||
and item.item_blocked = 0 ";
|
||||
}
|
||||
|
||||
function item_normal_update() {
|
||||
return " and item.item_hidden = 0 and item.item_type = 0
|
||||
and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0
|
||||
and item.item_blocked = 0 ";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
|
@ -650,8 +650,9 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||
KEY `created` (`created`),
|
||||
KEY `edited` (`edited`),
|
||||
KEY `received` (`received`),
|
||||
KEY `uid_commented` (`uid`,`commented`),
|
||||
KEY `uid_created` (`uid`,`created`),
|
||||
KEY `uid_commented` (`uid`, `commented`),
|
||||
KEY `uid_created` (`uid`, `created`),
|
||||
KEY `uid_item_unseen` (`uid`, `item_unseen`);
|
||||
KEY `aid` (`aid`),
|
||||
KEY `owner_xchan` (`owner_xchan`),
|
||||
KEY `author_xchan` (`author_xchan`),
|
||||
|
@ -621,6 +621,7 @@ create index "item_edited" on item ("edited");
|
||||
create index "item_received" on item ("received");
|
||||
create index "item_uid_commented" on item ("uid","commented");
|
||||
create index "item_uid_created" on item ("uid","created");
|
||||
create index "item_uid_unseen" on item ("uid","item_unseen");
|
||||
create index "item_changed" on item ("changed");
|
||||
create index "item_comments_closed" on item ("comments_closed");
|
||||
create index "item_aid" on item ("aid");
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1193 );
|
||||
define( 'UPDATE_VERSION' , 1194 );
|
||||
|
||||
/**
|
||||
*
|
||||
@ -2978,3 +2978,17 @@ function update_r1192() {
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
function update_r1193() {
|
||||
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
|
||||
$r1 = q("CREATE INDEX item_uid_unseen ON item (uid, item_unseen)");
|
||||
}
|
||||
else {
|
||||
$r1 = q("ALTER TABLE item ADD INDEX uid_item_unseen (uid, item_unseen);");
|
||||
}
|
||||
|
||||
if($r1)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ function closeMenu(theID) {
|
||||
function markRead(notifType) {
|
||||
$.get('ping?f=&markRead='+notifType);
|
||||
if(timer) clearTimeout(timer);
|
||||
$('#' + notifType + '-update').html('');
|
||||
$('.' + notifType + '-button').hide();
|
||||
timer = setTimeout(NavUpdate,2000);
|
||||
}
|
||||
|
||||
@ -446,13 +446,13 @@ function NavUpdate() {
|
||||
|
||||
if(data.network == 0) {
|
||||
data.network = '';
|
||||
$('.net-update, .net-button').hide();
|
||||
$('.network-update, .network-button').hide();
|
||||
document.title = savedTitle;
|
||||
} else {
|
||||
$('.net-update, .net-button').show();
|
||||
$('.network-update, .network-button').show();
|
||||
document.title = '(' + data.network + ') ' + savedTitle;
|
||||
}
|
||||
$('.net-update').html(data.network);
|
||||
$('.network-update').html(data.network);
|
||||
|
||||
if(data.pubs == 0) {
|
||||
data.pubs = '';
|
||||
|
@ -75,10 +75,10 @@
|
||||
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
{{if $nav.network}}
|
||||
<li class="nav-item dropdown net-button" style="display: none;">
|
||||
<li class="nav-item dropdown network-button" style="display: none;">
|
||||
<a class="nav-link" href="#" title="{{$nav.network.3}}" id="{{$nav.network.4}}" data-toggle="dropdown" rel="#nav-network-menu">
|
||||
<i class="fa fa-fw fa-th"></i>
|
||||
<span class="badge badge-pill badge-secondary net-update"></span>
|
||||
<span class="badge badge-pill badge-secondary network-update"></span>
|
||||
</a>
|
||||
<div id="nav-network-menu" class="dropdown-menu" rel="network">
|
||||
<a class="dropdown-item" id="nav-network-see-all" href="{{$nav.network.all.0}}">{{$nav.network.all.1}}</a>
|
||||
|
Reference in New Issue
Block a user