Update for search by date
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 11 Sep 2018 14:30:16 +0000 (10:30 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 11 Sep 2018 14:30:16 +0000 (10:30 -0400)
Update default for search_params

index.php
models/admin/travel/members.php

index 18d4e13..cb0d41f 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Associate - Travel Leads
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Trevel Leads
- * Version: 1.0.1
+ * Version: 1.0.2
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersTravelAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.1
+ * @version 1.0.2
  */
 
 // Check that we're being called by WordPress.
@@ -43,7 +43,7 @@ if (!defined('ABSPATH')) {
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_TRAVEL_PLUGIN_VERSION', '1.0.1');
+define('GLM_MEMBERS_TRAVEL_PLUGIN_VERSION', '1.0.2');
 define('GLM_MEMBERS_TRAVEL_PLUGIN_DB_VERSION', '0.0.5');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 3f406dd..b2640a6 100644 (file)
@@ -110,7 +110,6 @@ class GlmMembersAdmin_travel_members extends GlmDataTravelLeads
         $hasSearch           = false;
         $tab                 = 0;
         $params              = false;
-        $search_params       = false;
 
         // Get any provided option
         if ( isset( $_REQUEST['option'] ) ) {
@@ -217,6 +216,8 @@ class GlmMembersAdmin_travel_members extends GlmDataTravelLeads
                 );
             }
 
+            // echo '<pre>$search_params: ' . print_r( $search_params, true ) . '</pre>';
+
             // If we have wpUser then save searches for them.
             if ( $wpUser['ID'] ) {
                 $search_data = array(
@@ -290,6 +291,8 @@ class GlmMembersAdmin_travel_members extends GlmDataTravelLeads
 
         }
 
+        // echo '<pre>$where_parts: ' . print_r( $where_parts, true ) . '</pre>';
+
         // Initialize the interests array
         $interests = array();
 
@@ -404,7 +407,7 @@ class GlmMembersAdmin_travel_members extends GlmDataTravelLeads
             'inserting_error' => $inserting_error,
             'assetsUrl'       => GLM_MEMBERS_TRAVEL_PLUGIN_URL . 'assets',
             'states'          => $this->config['states'],
-            'search_params'   => $search_params,
+            'search_params'   => ( isset( $search_params ) ) ? $search_params : false,
         );