aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Cal.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Cal.php')
-rw-r--r--Zotlabs/Module/Cal.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/Cal.php b/Zotlabs/Module/Cal.php
index b2e1c9235..1279a51b1 100644
--- a/Zotlabs/Module/Cal.php
+++ b/Zotlabs/Module/Cal.php
@@ -109,7 +109,7 @@ class Cal extends \Zotlabs\Web\Controller {
/* edit/create form */
if($event_id) {
- $r = q("SELECT * FROM `event` WHERE event_hash = '%s' AND `uid` = %d LIMIT 1",
+ $r = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
dbesc($event_id),
intval($channel['channel_id'])
);
@@ -228,7 +228,7 @@ class Cal extends \Zotlabs\Web\Controller {
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
from event left join item on event_hash = resource_id
- where resource_type = 'event' and event.uid = %d $ignored
+ where resource_type = 'event' and event.uid = %d and event.uid = item.uid $ignored
AND (( adjust = 0 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )
OR ( adjust = 1 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )) $sql_extra ",
intval($channel['channel_id']),