From: Steve Sutton Date: Tue, 20 Mar 2018 12:46:32 +0000 (-0400) Subject: Remove the wmta search stuff from main member plugin. X-Git-Tag: v2.10.27^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=07677f41ac8afdf44d19e591b280afaeee7d4889;p=WP-Plugins%2Fglm-member-db.git Remove the wmta search stuff from main member plugin. Moving this part into wmta theme. They want it to search for city names. --- diff --git a/index.php b/index.php index 48110e7b..c864a233 100644 --- 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 * @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 diff --git a/models/front/members/list.php b/models/front/members/list.php index 4d56e0ef..b7425efc 100644 --- a/models/front/members/list.php +++ b/models/front/members/list.php @@ -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); }