Remove the wmta search stuff from main member plugin.
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 20 Mar 2018 12:46:32 +0000 (08:46 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 20 Mar 2018 12:46:32 +0000 (08:46 -0400)
Moving this part into wmta theme. They want it to search for city names.

index.php
models/front/members/list.php

index 48110e7..c864a23 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 2.10.26
+ * Version: 2.10.27
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabase
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 2.10.26
+ * @version 2.10.27
  */
 
 $GLOBALS['glmAssociateMemTracker'] = memory_get_usage();
@@ -46,7 +46,7 @@ if (!defined('ABSPATH')) {
  *
  */
 
-define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.26');
+define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.27');
 define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.34');
 
 // Check if plugin version is not current in WordPress option and if needed updated it
index 4d56e0e..b7425ef 100644 (file)
@@ -274,30 +274,18 @@ class GlmMembersFront_members_list extends GlmDataMemberInfo
         // Apply any provided text search to name, description, short description, and street address
         if (trim($actionData['request']['text-search']) != '') {
             $textSearch = addslashes(filter_var($actionData['request']['text-search'], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
-            // If there's Wordpress search then only search the member name field
-            if ( isset( $_REQUEST['s'] ) ) {
-                $where .= $whereSep." (
-                    (
-                        SELECT true
-                          FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members
-                         WHERE id = T.member
-                           AND name LIKE '%$textSearch%'
-                       )
-                )";
-            } else {
-                $where .= $whereSep." (
-                    (
-                        SELECT true
-                          FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members
-                         WHERE id = T.member
-                           AND name LIKE '%$textSearch%'
-                    ) OR
-                    T.descr LIKE '%$textSearch%' OR
-                    T.short_descr LIKE '%$textSearch%' OR
-                    T.addr1 LIKE '%$textSearch%' OR
-                    T.addr2 LIKE '%$textSearch%'
-                )";
-            }
+            $where .= $whereSep." (
+                (
+                    SELECT true
+                      FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members
+                     WHERE id = T.member
+                       AND name LIKE '%$textSearch%'
+                ) OR
+                T.descr LIKE '%$textSearch%' OR
+                T.short_descr LIKE '%$textSearch%' OR
+                T.addr1 LIKE '%$textSearch%' OR
+                T.addr2 LIKE '%$textSearch%'
+            )";
             $whereSep = ' AND ';
             $textSearch = stripslashes($textSearch);
         }