Now removing old impages also.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 11 May 2015 19:28:02 +0000 (15:28 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 11 May 2015 19:28:02 +0000 (15:28 -0400)
classes/glmMemberImportFromConnections.php
models/admin/configure/development.php

index 5a361b0..142caa5 100644 (file)
@@ -465,8 +465,8 @@ class GlmMemberImportFromConnections
                         '".$addr['state']."',
                         '".$addr['country']."',
                         '".$addr['zipcode']."',
-                        ".$addr['latitude'].",
-                        ".$addr['longitude'].",
+                        ".($addr['latitude']!=''?$addr['latitude']:'null').",
+                        ".($addr['longitude']!=''?$addr['longitude']:'null').",
                         $regionID,
                         '$phone',
                         '$toll_free',
index 1dd42a3..bcf3431 100644 (file)
@@ -137,7 +137,13 @@ class GlmMembersAdmin_configure_development
                     glmMembersAdmin::addNotice('<b>Database tables have been reset in preparation importing members.</b><br>', 'AdminNotice');
 
                     // Delete Images
-//                    unlink(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/*');
+                    foreach( new RecursiveIteratorIterator(
+                        new RecursiveDirectoryIterator( GLM_MEMBERS_PLUGIN_IMAGES_PATH, FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS ),
+                        RecursiveIteratorIterator::CHILD_FIRST ) as $value ) {
+                            if ($value->isFile()) {
+                                unlink( $value );
+                            }
+                        }
 
                     $templateData['import'] = true;
                     $templateData['membersImported'] = $Connections->doImport();