aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Hq.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
committerMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
commit4baf5eab16d809977a44e7911ddcab0ff8383897 (patch)
tree393f618c4cfc20f53264ecd8a26a08de0823d35d /Zotlabs/Module/Hq.php
parent577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff)
parent7361af85b5488fc8bd1744389a3a332dc74276b0 (diff)
downloadvolse-hubzilla-4baf5eab16d809977a44e7911ddcab0ff8383897.tar.gz
volse-hubzilla-4baf5eab16d809977a44e7911ddcab0ff8383897.tar.bz2
volse-hubzilla-4baf5eab16d809977a44e7911ddcab0ff8383897.zip
Merge branch '3.2RC'3.2
Diffstat (limited to 'Zotlabs/Module/Hq.php')
-rw-r--r--Zotlabs/Module/Hq.php37
1 files changed, 17 insertions, 20 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index 1e46a6353..baeba82e8 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -29,6 +29,8 @@ class Hq extends \Zotlabs\Web\Controller {
);
}
+ killme();
+
}
function get($update = 0, $load = false) {
@@ -50,9 +52,9 @@ class Hq extends \Zotlabs\Web\Controller {
$item_normal_update = item_normal_update();
if(! $item_hash) {
- $r = q("SELECT mid FROM item
- WHERE uid = %d
- AND mid = parent_mid
+ $r = q("SELECT mid FROM item
+ WHERE uid = %d $item_normal
+ AND mid = parent_mid
ORDER BY created DESC LIMIT 1",
intval(local_channel())
);
@@ -135,13 +137,11 @@ class Hq extends \Zotlabs\Web\Controller {
$o = replace_macros(get_markup_template("hq.tpl"),
[
'$no_messages' => (($target_item) ? false : true),
- '$no_messages_label' => t('Welcome to hubzilla!')
+ '$no_messages_label' => [ t('Welcome to Hubzilla!'), t('You have got no unseen posts...') ],
+ '$editor' => status_editor($a,$x)
]
);
-
- $o = '<div id="jot-popup">';
- $o .= status_editor($a,$x);
- $o .= '</div>';
+
}
if(! $update && ! $load) {
@@ -266,23 +266,20 @@ class Hq extends \Zotlabs\Web\Controller {
}
if($r) {
- $parents_str = ids_to_querystr($r,'item_id');
- if($parents_str) {
- $items = q("SELECT item.*, item.id AS item_id
- FROM item
- WHERE parent IN ( %s ) $item_normal ",
- dbesc($parents_str)
- );
+ $items = q("SELECT item.*, item.id AS item_id
+ FROM item
+ WHERE parent = '%s' $item_normal ",
+ dbesc($r[0]['item_id'])
+ );
- xchan_query($items,true,(($sys_item) ? local_channel() : 0));
- $items = fetch_post_tags($items,true);
- $items = conv_sort($items,'created');
- }
+ xchan_query($items,true,(($sys_item) ? local_channel() : 0));
+ $items = fetch_post_tags($items,true);
+ $items = conv_sort($items,'created');
}
else {
$items = [];
}
-
+
$o .= conversation($items, 'hq', $update, 'client');
if($updateable) {