From: Chuck Scott Date: Mon, 11 May 2015 19:28:02 +0000 (-0400) Subject: Now removing old impages also. X-Git-Tag: v1.0.0~29 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=9f07919ffcafc44e4cf859368b5f3a15ce48c2bd;p=WP-Plugins%2Fglm-member-db.git Now removing old impages also. --- diff --git a/classes/glmMemberImportFromConnections.php b/classes/glmMemberImportFromConnections.php index 5a361b0e..142caa58 100644 --- a/classes/glmMemberImportFromConnections.php +++ b/classes/glmMemberImportFromConnections.php @@ -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', diff --git a/models/admin/configure/development.php b/models/admin/configure/development.php index 1dd42a38..bcf34310 100644 --- a/models/admin/configure/development.php +++ b/models/admin/configure/development.php @@ -137,7 +137,13 @@ class GlmMembersAdmin_configure_development glmMembersAdmin::addNotice('Database tables have been reset in preparation importing members.
', '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();