List for categories should have only active events.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 9 Nov 2016 20:40:29 +0000 (15:40 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 9 Nov 2016 20:40:29 +0000 (15:40 -0500)
Restrict the category list for event search to categories that are in
active events.

classes/data/dataCategories.php

index bd74e77..eabf097 100644 (file)
@@ -351,6 +351,11 @@ class GlmDataEventsCategories extends GlmDataAbstract
                  WHERE active
                    AND start_time >= NOW()
             )
+            AND event IN (
+               SELECT id
+                 FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "events
+                WHERE status = 10
+            )
         ) ";
         $order = "T.name";
         return $this->getList($where, $order);