fixing events calendar default view, it wasn't being set to agenda after the last fix
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 26 Jan 2017 20:18:17 +0000 (15:18 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 26 Jan 2017 20:18:17 +0000 (15:18 -0500)
models/front/events/list.php

index 27284eb..a8c9421 100644 (file)
@@ -696,17 +696,12 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
         $sql = "SELECT calendar_view FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "management";
         $calendar_view = $wpdb->get_results($sql, ARRAY_A);
 
-        // check if event search was performed and if it is override the view to agenda
-//        $override_default_view = ( isset( $_REQUEST['override_default'] ) ) ? $_REQUEST['override_default'] : 'no';
-//
-//        if ( $override_default_view === 'yes' ) {
-//            $calendar_view = "agenda";
-//        } else if ( $calendar_view[0]['calendar_view'] === "" || empty($calendar_view[0]['calendar_view'] ) ) {
-//            $calendar_view = "agenda";
-//        } else {
-//            $calendar_view = $calendar_view[0]['calendar_view'];
-//        }
-        $calendar_view = $calendar_view[0]['calendar_view'];
+        if ( $calendar_view[0]['calendar_view'] === "" || empty($calendar_view[0]['calendar_view'] ) ) {
+            $calendar_view = "agenda";
+        } else {
+            $calendar_view = $calendar_view[0]['calendar_view'];
+        }
+
         // Compile template data
         $templateData = array(
             'eventDays'    => $eventDays,