aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-02-13 20:36:33 +0100
committerMario <mario@mariovavti.com>2019-02-13 20:36:33 +0100
commit7b8eb84cb8bf46365390b192d00e21ae587f7295 (patch)
tree93a58c95e07826516db690966acef1c58e5dcaad /Zotlabs/Lib
parent07df43aa2a8d51f75c60733243e8d4a610daa0d1 (diff)
parentc3e2b463e4604d5bb148ebbaa97b68ca33ce89e1 (diff)
downloadvolse-hubzilla-7b8eb84cb8bf46365390b192d00e21ae587f7295.tar.gz
volse-hubzilla-7b8eb84cb8bf46365390b192d00e21ae587f7295.tar.bz2
volse-hubzilla-7b8eb84cb8bf46365390b192d00e21ae587f7295.zip
Merge branch 'patch-20190212a' into 'dev'
Fix: only first lock red with privacy_warning See merge request hubzilla/core!1510
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/ThreadItem.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index bdbfc4385..04265ee5a 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -76,7 +76,7 @@ class ThreadItem {
* _ false on failure
*/
- public function get_template_data($conv_responses, $thread_level=1) {
+ public function get_template_data($conv_responses, $thread_level=1, $conv_flags = []) {
$result = array();
@@ -117,11 +117,14 @@ class ThreadItem {
}
if ($lock) {
- if (count(get_terms_oftype($item['term'],TERM_FORUM))) {
+ if (($item['mid'] == $item['parent_mid']) && count(get_terms_oftype($item['term'],TERM_FORUM))) {
$privacy_warning = true;
+ $conv_flags['parent_privacy_warning'] = true;
}
}
+ $privacy_warning = (isset($conv_flags['parent_privacy_warning'])) ? $conv_flags['parent_privacy_warning'] : $privacy_warning;
+
if ($lock && $privacy_warning) {
$lock = t('Privacy conflict. Discretion advised.');
}
@@ -488,7 +491,7 @@ class ThreadItem {
if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) {
foreach($children as $child) {
- $result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1);
+ $result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1,$conv_flags);
}
// Collapse
if(($nb_children > $visible_comments) || ($thread_level > 1)) {