]> git.mxchange.org Git - friendica.git/commitdiff
need a lower bound for events
authorFriendika <info@friendika.com>
Tue, 25 Oct 2011 07:36:23 +0000 (00:36 -0700)
committerFriendika <info@friendika.com>
Tue, 25 Oct 2011 07:36:23 +0000 (00:36 -0700)
boot.php

index 45e02d1ed86a9d924dac5d1c47659c2d74ea48d4..32ed3e40a3f35729c0d08406753dc076d9e6c25e 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1046,10 +1046,11 @@ function get_events() {
        $bd_short = t('F d');
 
        $r = q("SELECT `event`.* FROM `event` 
-               WHERE `event`.`uid` = %d AND `type` != 'birthday' AND `start` < '%s' 
+               WHERE `event`.`uid` = %d AND `type` != 'birthday' AND `start` < '%s' AND `start` > '%s'
                ORDER BY `start` DESC ",
                intval(local_user()),
-               dbesc(datetime_convert('UTC','UTC','now + 6 days'))
+               dbesc(datetime_convert('UTC','UTC','now + 6 days')),
+               dbesc(datetime_convert('UTC','UTC','now - 1 days'))
        );
 
        if($r && count($r)) {