From 3eba0c2297d8f15ea47b0d481f9392fe6c9ecc7e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 10 Jan 2019 12:35:27 +0000 Subject: [PATCH 1/6] do not count removed channels (cherry picked from commit 01f4ce96f1fe835db774acffb65b2553e1b44c0a) --- Zotlabs/Module/New_channel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php index 73cdf4c8c..98aa480fe 100644 --- a/Zotlabs/Module/New_channel.php +++ b/Zotlabs/Module/New_channel.php @@ -134,7 +134,7 @@ class New_channel extends \Zotlabs\Web\Controller { $default_role = ''; $aid = get_account_id(); if($aid) { - $r = q("select count(channel_id) as total from channel where channel_account_id = %d", + $r = q("select count(channel_id) as total from channel where channel_account_id = %d and channel_removed = 0", intval($aid) ); if($r && (! intval($r[0]['total']))) { From 57dde3e980fcdb6937da4862c0bcc9914f2df24b Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 10 Jan 2019 23:02:58 +0000 Subject: [PATCH 2/6] failure to import mail (cherry picked from commit 7b30fc4b82da0a64e152cdeb82564f8d52b7177e) --- include/import.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/import.php b/include/import.php index 6476aa688..5c0cb9bed 100644 --- a/include/import.php +++ b/include/import.php @@ -1035,8 +1035,9 @@ function import_mail($channel, $mails, $sync = false) { if(! $m) continue; - $m['aid'] = $channel['channel_account_id']; - $m['uid'] = $channel['channel_id']; + $m['account_id'] = $channel['channel_account_id']; + $m['channel_id'] = $channel['channel_id']; + $mail_id = mail_store($m); if($sync && $mail_id) { Zotlabs\Daemon\Master::Summon(array('Notifier','single_mail',$mail_id)); From ddbc35181c2a2814466996dbc2ed6ef35261f2c8 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 23 Jan 2019 14:36:34 +0000 Subject: [PATCH 3/6] fix page jumping when liking a collapsed/expanded post (cherry picked from commit 54806f6ee882d1d29a800f31eb42508221e59dc3) --- view/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/js/main.js b/view/js/main.js index a69bcfa64..7a047cd42 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -832,10 +832,10 @@ function collapseHeight() { }); var collapsedContentHeight = Math.ceil($("#region_2").height()); - contentHeightDiff = origContentHeight - collapsedContentHeight; + contentHeightDiff = liking ? 0 : origContentHeight - collapsedContentHeight; console.log('collapseHeight() - contentHeightDiff: ' + contentHeightDiff + 'px'); - if(i){ + if(i && !liking){ var sval = position - cDiff + ($(".divgrow-showmore").outerHeight() * i); console.log('collapsed above viewport count: ' + i); $(window).scrollTop(sval); From cda8a7be38a8f63d2af90d640755f36c7cf660ec Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 3 Feb 2019 13:52:50 +0000 Subject: [PATCH 4/6] do not overwrite $sql_extra (cherry picked from commit 4706ff693843e0fd059bba5d306a172f059b4af7) --- Zotlabs/Module/Oep.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index 0f20a5f9a..491a48f28 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -181,7 +181,7 @@ class Oep extends \Zotlabs\Web\Controller { dbesc($res) ); if($r) { - $sql_extra = "and item.id = " . intval($r[0]['iid']) . " "; + $sql_extra .= " and item.id = " . intval($r[0]['iid']) . " "; } else { return $ret; @@ -255,6 +255,8 @@ class Oep extends \Zotlabs\Web\Controller { if(! $channel) return $ret; +hz_syslog($nick); + if(! perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_pages')) return $ret; @@ -265,7 +267,7 @@ class Oep extends \Zotlabs\Web\Controller { dbesc($res) ); if($r) { - $sql_extra = "and item.id = " . intval($r[0]['iid']) . " "; + $sql_extra .= " and item.id = " . intval($r[0]['iid']) . " "; } else { return $ret; From b6c384a0f72cbcfd32248650f1c2a9e05d34546b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 3 Feb 2019 13:58:19 +0000 Subject: [PATCH 5/6] cleanup logging and return if query returns empty result (cherry picked from commit c657d766cf0dbca750840a4395003ea9e94a4809) --- Zotlabs/Module/Oep.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index 491a48f28..c0d8e15e5 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -194,6 +194,9 @@ class Oep extends \Zotlabs\Web\Controller { intval(ITEM_TYPE_CARD) ); + if(! $r) + return; + $item_normal = " and item.item_hidden = 0 and item.item_type in (0,6) and item.item_deleted = 0 and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0 and item.item_blocked = 0 "; @@ -255,9 +258,6 @@ class Oep extends \Zotlabs\Web\Controller { if(! $channel) return $ret; -hz_syslog($nick); - - if(! perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_pages')) return $ret; @@ -280,6 +280,9 @@ hz_syslog($nick); intval(ITEM_TYPE_ARTICLE) ); + if(! $r) + return; + $item_normal = " and item.item_hidden = 0 and item.item_type in (0,7) and item.item_deleted = 0 and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0 and item.item_blocked = 0 "; From 90fd323ac54619766feedf699e5f53fce04fc295 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 3 Feb 2019 15:03:56 +0100 Subject: [PATCH 6/6] bump version --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 2530feeca..dd1a7b86c 100755 --- a/boot.php +++ b/boot.php @@ -50,7 +50,7 @@ require_once('include/attach.php'); require_once('include/bbcode.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '3.8.8' ); +define ( 'STD_VERSION', '3.8.9' ); define ( 'ZOT_REVISION', '6.0a' ); define ( 'DB_UPDATE_VERSION', 1225 );