From: Steve Sutton Date: Mon, 25 Jul 2016 12:34:21 +0000 (-0400) Subject: Sources should only get ones with enabled as true. X-Git-Tag: v1.0.0^2~7 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=276b161e3137371cc103d2c27e9aa9de2f1520c0;p=WP-Plugins%2Fglm-member-db-leads.git Sources should only get ones with enabled as true. If the form is not enabled then don't show it in the list. --- diff --git a/models/admin/leads/index.php b/models/admin/leads/index.php index 17cf5b7..ee705fb 100644 --- a/models/admin/leads/index.php +++ b/models/admin/leads/index.php @@ -772,7 +772,10 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry // Fetch the sources $sources = $this->wpdb->get_results( - "SELECT * FROM " . GLM_MEMBERS_LEADS_PLUGIN_DB_PREFIX . "sources ORDER BY title", + "SELECT * + FROM " . GLM_MEMBERS_LEADS_PLUGIN_DB_PREFIX . "sources + WHERE enabled = true + ORDER BY title", ARRAY_A ); @@ -817,10 +820,10 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry // Return status, any suggested view, and any data to controller return array( - 'status' => true, - 'modelRedirect' => false, - 'view' => 'admin/leads/' . $view, - 'data' => $templateData + 'status' => true, + 'modelRedirect' => false, + 'view' => 'admin/leads/' . $view, + 'data' => $templateData ); }