aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-08-27 10:02:58 +0200
committerMario <mario@mariovavti.com>2018-08-27 10:02:58 +0200
commit4c1944a08dcaacf1d638af60cb1f7679cb88c192 (patch)
treea14eea0f66af3a524453edf4bdfec296262d53e3
parent95f870f1b41ff243a03617b368c8606354de8273 (diff)
parenta0c2bbac9d96a5461b65b5e0ff733a2fcd193dd4 (diff)
downloadvolse-hubzilla-4c1944a08dcaacf1d638af60cb1f7679cb88c192.tar.gz
volse-hubzilla-4c1944a08dcaacf1d638af60cb1f7679cb88c192.tar.bz2
volse-hubzilla-4c1944a08dcaacf1d638af60cb1f7679cb88c192.zip
Merge branch 'extend-convitems-dropdown' into 'dev'
Extend cog dropdown & temp fix for feed display of corrupt mids See merge request hubzilla/core!1265
-rw-r--r--Zotlabs/Lib/ThreadItem.php5
-rw-r--r--Zotlabs/Module/Network.php4
-rwxr-xr-xview/tpl/conv_item.tpl4
3 files changed, 11 insertions, 2 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index ed78ae00b..f8a7366f8 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -325,6 +325,10 @@ class ThreadItem {
$has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false);
+ $dropdown_extras_arr = [ 'item' => $item , 'dropdown_extras' => '' ];
+ call_hooks('dropdown_extras',$dropdown_extras_arr);
+ $dropdown_extras = $dropdown_extras_arr['dropdown_extras'];
+
$tmp_item = array(
'template' => $this->get_template(),
'mode' => $mode,
@@ -404,6 +408,7 @@ class ThreadItem {
'addtocal' => (($has_event) ? t('Add to Calendar') : ''),
'drop' => $drop,
'multidrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $multidrop : ''),
+ 'dropdown_extras' => $dropdown_extras,
// end toolbar buttons
'unseen_comments' => $unseen_comments,
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index ca0ec7844..9eedf113d 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -510,7 +510,7 @@ class Network extends \Zotlabs\Web\Controller {
if($load) {
// Fetch a page full of parent items for this page
- $r = q("SELECT item.parent AS item_id FROM item
+ $r = q("SELECT DISTINCT(item.parent) AS item_id FROM item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
$net_query
WHERE true $uids $item_thread_top $item_normal
@@ -524,7 +524,7 @@ class Network extends \Zotlabs\Web\Controller {
else {
// this is an update
- $r = q("SELECT item.parent AS item_id FROM item
+ $r = q("SELECT DISTINCT(item.parent) AS item_id FROM item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
$net_query
WHERE true $uids $item_normal_update $simple_update
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index ac6af40e9..05c3d7ae0 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -175,6 +175,10 @@
{{if $item.drop.dropping}}
<a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
{{/if}}
+ {{if $item.dropdown_extras}}
+ <div class="dropdown-divider"></div>
+ {{$item.dropdown_extras}}
+ {{/if}}
{{if $item.edpost && $item.dreport}}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>