aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2012-06-07 08:28:10 -0400
committerfabrixxm <fabrix.xm@gmail.com>2012-06-07 08:28:10 -0400
commit757037c3bfe7c8f23a8dbda2f7be7b1dfaacf739 (patch)
tree2201e37953dd3f3f95f3cfa990622f92b157665f /mod
parent6477c24919eb969d80324cf29129213f2fb8a0ea (diff)
downloadvolse-hubzilla-757037c3bfe7c8f23a8dbda2f7be7b1dfaacf739.tar.gz
volse-hubzilla-757037c3bfe7c8f23a8dbda2f7be7b1dfaacf739.tar.bz2
volse-hubzilla-757037c3bfe7c8f23a8dbda2f7be7b1dfaacf739.zip
events: fix select events query
select events that starts before display start date and/or ends after display end date.
Diffstat (limited to 'mod')
-rwxr-xr-x[-rw-r--r--]mod/events.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/events.php b/mod/events.php
index 069046ff9..2a6fb692e 100644..100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -230,8 +230,8 @@ function events_content(&$a) {
$r = q("SELECT `event`.*, `item`.`id` AS `itemid`,`item`.`plink`,
`item`.`author-name`, `item`.`author-avatar`, `item`.`author-link` FROM `event` LEFT JOIN `item` ON `item`.`event-id` = `event`.`id`
WHERE `event`.`uid` = %d
- AND (( `adjust` = 0 AND `start` >= '%s' AND `start` <= '%s' )
- OR ( `adjust` = 1 AND `start` >= '%s' AND `start` <= '%s' )) ",
+ AND (( `adjust` = 0 AND `finish` >= '%s' AND `start` <= '%s' )
+ OR ( `adjust` = 1 AND `finish` >= '%s' AND `start` <= '%s' )) ",
intval(local_user()),
dbesc($start),
dbesc($finish),