aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-09-03 21:33:07 +0200
committerMario Vavti <mario@mariovavti.com>2017-09-03 21:33:07 +0200
commitdc18440c18549a07b31c7506316e7a4bd40b9712 (patch)
treeed905c6494a8858d8ac264a141891524d8e631f5 /Zotlabs/Module/Channel.php
parent1a0cf2666a757314edfb5f6f1ea40c5e1e8750ea (diff)
downloadvolse-hubzilla-dc18440c18549a07b31c7506316e7a4bd40b9712.tar.gz
volse-hubzilla-dc18440c18549a07b31c7506316e7a4bd40b9712.tar.bz2
volse-hubzilla-dc18440c18549a07b31c7506316e7a4bd40b9712.zip
introduce item_normal_update(). the differnce to item_normal() is that we do not query for item_deleted = 0 and therefor can find deleted likes which allows us to update our unlikes on the fly if static page update is enabled
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r--Zotlabs/Module/Channel.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index 5e7db79d9..95d8f3734 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -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))
@@ -198,7 +199,7 @@ class Channel extends \Zotlabs\Web\Controller {
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'])