Author: sevein
Date: Sun Sep 20 15:05:21 2009
New Revision: 3449

Log:
Fix bug introduced in r3438 which was removing web/images/generic-icons/* files 
when thumbnails were being replaced with these generic icons (in cases where 
gd/imagemagick are not able to produce thumbnails).

Modified:
   
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php

Modified: 
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php
==============================================================================
--- 
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php  
    Sun Sep 20 14:59:24 2009        (r3448)
+++ 
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php  
    Sun Sep 20 15:05:21 2009        (r3449)
@@ -133,12 +133,14 @@
         $digitalObject->save();
       }
 
+      $thumbnailIsGeneric = (bool) strstr($file['thumb'], 'generic-icons');
+
       // Clean up temp files
       if (file_exists($tmpPath.'/'.$file['tmpName']))
       {
         unlink($tmpPath.'/'.$file['tmpName']);
       }
-      if (file_exists($tmpPath.'/'.$file['thumb']))
+      if (!$thumbnailIsGeneric && file_exists($tmpPath.'/'.$file['thumb']))
       {
         unlink($tmpPath.'/'.$file['thumb']);
       }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to