From 276b161e3137371cc103d2c27e9aa9de2f1520c0 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 25 Jul 2016 08:34:21 -0400 Subject: [PATCH] Sources should only get ones with enabled as true. If the form is not enabled then don't show it in the list. --- models/admin/leads/index.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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 ); } -- 2.17.1