]> _ Git - cubeextranet.git/commitdiff
Debug problem with zoom zone files filling /tmp partition. WIP #1395 @1.5
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 24 May 2017 16:30:51 +0000 (16:30 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 24 May 2017 16:30:51 +0000 (16:30 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index b54ef1bf6d5c647374d85227e61267183a7902e5..95c8df4803d02911e0b11c21bb5d1f7fc40f9c42 100644 (file)
@@ -1142,6 +1142,14 @@ class zoomLink extends normalLink {
                }
 
                $this->compiler->simpleCopyLinkFile($both, 'data/links/zoom_' . $this->id . '.jpg');
+
+        // Perform tidy up and delete temporary files if they exist
+        $files_to_delete = ['left', 'leftfile', 'right', 'rightfile', 'both'];
+        foreach($files_to_delete as $file) {
+            if (isset($$file) && file_exists($$file)) {
+                unlink($$file);
+            }
+        }
        }