From: Steve Sutton Date: Thu, 9 Aug 2018 18:41:00 +0000 (-0400) Subject: Set to use the business_city X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2195ae8e801b6ee22a0113c01ae7dbdf8488fe8b;p=WP-Plugins%2Fglm-member-db-contacts.git Set to use the business_city Using business_city --- diff --git a/models/front/contacts/list.php b/models/front/contacts/list.php index 53aa077..fc0ca4b 100644 --- a/models/front/contacts/list.php +++ b/models/front/contacts/list.php @@ -195,7 +195,7 @@ class GlmMembersFront_contacts_list extends GlmDataContacts if (isset($_REQUEST['citySearch']) && $_REQUEST['citySearch'] !== "") { $citySearch = esc_sql($_REQUEST['citySearch']); $where .= " AND ( - city = $citySearch + business_city = $citySearch )"; $haveFilter = true; } diff --git a/setup/frontHooks.php b/setup/frontHooks.php index a1baf41..3c7c89b 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -79,9 +79,10 @@ add_filter( 'glm-member-contact-cities', function(){ $contactCities = $wpdb->get_results( "SELECT id, name FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "cities - WHERE id IN (SELECT city + WHERE id IN (SELECT business_city FROM ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts - WHERE active = true) + WHERE active = true + AND access NOT IN ( 35, 45, 10, 90 ) ) ORDER BY name" ); return $contactCities;