]> git.mxchange.org Git - friendica.git/commitdiff
events: fix select events query
authorfabrixxm <fabrix.xm@gmail.com>
Thu, 7 Jun 2012 12:28:10 +0000 (08:28 -0400)
committerfabrixxm <fabrix.xm@gmail.com>
Thu, 7 Jun 2012 12:28:10 +0000 (08:28 -0400)
select events that starts before display start date and/or ends
after display end date.

mod/events.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 069046f..2a6fb69
@@ -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),