From: Steve Sutton Date: Tue, 29 Oct 2019 20:41:21 +0000 (-0400) Subject: Update again X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2df4f5ac6cad5a938bf5741b0d6281c270f8d87c;p=WP-Plugins%2Fglm-member-db-plugins.git Update again Missed something need sub query --- diff --git a/models/admin/ajax/pluginListSites.php b/models/admin/ajax/pluginListSites.php index 94d22cd..5b4072f 100644 --- a/models/admin/ajax/pluginListSites.php +++ b/models/admin/ajax/pluginListSites.php @@ -92,10 +92,22 @@ class GlmMembersAdmin_ajax_pluginListSites extends GlmDataSites if ( $server['production'] ) { $whereParts[] = "T.prod_server = " . $server['id']; $whereParts[] = "T.active"; - $whereParts[] = "( T.prod_version != '' AND T.prod_version IS NOT NULL AND T.prod_version != '-' )"; + $whereParts[] = "T.id IN ( + SELECT site + FROM " . GLM_MEMBERS_PLUGINS_PLUGIN_DB_PREFIX . "site_plugins + WHERE prod_version != '' + AND prod_version IS NOT NULL + AND prod_version != '-' + )"; } else { $whereParts[] = "T.dev_server = " . $server['id']; - $whereParts[] = "( T.dev_version != '' AND T.dev_version IS NOT NULL AND T.dev_version != '-' )"; + $whereParts[] = "T.id IN ( + SELECT site + FROM " . GLM_MEMBERS_PLUGINS_PLUGIN_DB_PREFIX . "site_plugins + WHERE dev_version != '' + AND dev_version IS NOT NULL + AND dev_version != '-' + )"; } } else { die( 'no server given' );