Fix for uptra lead import file
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 20 May 2019 18:39:46 +0000 (14:39 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 20 May 2019 18:39:46 +0000 (14:39 -0400)
Fixing how file is read.

models/admin/leads/index.php

index 261e6e0..c90f2d1 100644 (file)
@@ -1013,7 +1013,7 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry
                 $firstContact = false;
 
                 // If we're past the header, the first item is numeric, and we have at least 5 fields
-                if( $startImport && ( $c[0]-0 ) > 0 && count( $c ) >= 5 ) {
+                if( $startImport && count( $c ) >= 5 ) {
                     // Add this line of data to Contacts
                     $contacts[] = array_combine( $headers, $c );
                 }
@@ -1109,9 +1109,6 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry
                         $leadFormat[] = '%s';
                     }
                 }
-                // echo '<pre>$leadData: ' . print_r( $leadData, true ) . '</pre>';
-                // echo '<pre>$leadId: ' . print_r( $leadId, true ) . '</pre>';
-                // return false;
                 if ( isset( $leadData ) && !empty( $leadData ) ) {
                     $leadData['cleaned'] = true;
                     $leadFormat[]        = '%s';