Update getting events with limit set.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 9 Sep 2016 17:49:10 +0000 (13:49 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 9 Sep 2016 17:49:10 +0000 (13:49 -0400)
If limit was set the sql query was using NOW() function to get events.
If the start time of the event already past then it would not show up.
Changed the mysql function to CURDATE() This will get the date.

models/front/events/baseAction.php

index 3723bd7..67b8ce8 100644 (file)
@@ -111,7 +111,7 @@ abstract class GlmMembersFront_events_baseAction extends GlmDataEvents
                         SELECT distinct event
                           FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times AS ET
                          WHERE active
-                           AND start_time >= NOW()
+                           AND start_time >= CURDATE()
                     )
                 ";
             $order  = "T.id";