From: Steve Sutton Date: Tue, 26 Jul 2016 20:37:49 +0000 (-0400) Subject: Update to fix the csv file for different groups of interests. X-Git-Tag: v1.0.0^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=b183491ff4deda97548a0765f52a0c19237cefee;p=WP-Plugins%2Fglm-member-db-leads.git Update to fix the csv file for different groups of interests. When getting the entries for the file each one has to have all the group name fields so it can properly put them into the file. --- diff --git a/models/admin/leads/index.php b/models/admin/leads/index.php index ee705fb..a221772 100644 --- a/models/admin/leads/index.php +++ b/models/admin/leads/index.php @@ -422,6 +422,12 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry 'date_submitted' => $lead['date_submitted'], 'source' => $lead['source_id']['name'], ); + // Add fields for group names + if ( $groups ) { + foreach ( $groups as $group ) { + $out[$group['title']] = ''; + } + } if ( !$user_can_edit_leads ) { unset( $out['source'] @@ -514,12 +520,10 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry } // Get the record for this Entry. $entry = $this->editEntry( $this->entryId ); - //echo '
$entry: ' . print_r($entry, true) . '
'; // get the field from the leads table $leadData = new GlmDataLeads( $this->wpdb, $this->config ); $lead = $leadData->getEntry( $entry['fieldData']['lead_id']['value'] ); - //echo '
$lead: ' . print_r($lead, true) . '
'; // Use the edit view file. $view = 'edit.html'; @@ -605,7 +609,6 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry $lead_id = $this->wpdb->insert_id; } else { $lead_id = $lead['id']; - echo '
$lead: ' . print_r($lead, true) . '
'; } if ( !isset( $lead_id ) && !$lead_id ) { die( 'Fatal Error: Cannot generate lead_id for new leads record' );