About to give up!
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 11 May 2015 20:58:07 +0000 (16:58 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 11 May 2015 20:58:07 +0000 (16:58 -0400)
classes/glmMemberImportFromConnections.php

index ec02eae..8a5fb09 100644 (file)
@@ -550,9 +550,6 @@ class GlmMemberImportFromConnections
             $fInfo = pathinfo($image);
             $newFilename = $fInfo['filename'].'_'.time().'.'.$fInfo['extension'];
 
-            // Get image temp file name - Not currently using, but should be using to check for resizing sanity
-            $size = $newImage->get_size();
-
             // Try to store the image using that file name in the 'original' directory
             $storedImage = $newImage->save( GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$newFilename );
 
@@ -571,7 +568,6 @@ class GlmMemberImportFromConnections
                 if (isset($sizes[$k])) {
                     // Move resized file to desired direectory
                     rename(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$sizes[$k]['file'], GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$newFilename);
-                    unlink(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$sizes[$k]['file']);
                 } else {
                     // Image didn't resize to this size, probably because it was smaller than the destination size (silly WP Image Editor class) - so just use the original
                     copy(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$newFilename, GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$newFilename);