Ignore:
Timestamp:
12/07/11 17:51:00 (6 months ago)
Author:
adrian.budau
Message:

Fix more errors that occured durring the deployment of the avatar optimisation

Fixes to the attachments control. Users can't upload an attachment called avatar.
Now the avatar can be deleted.
Fixes to the image resize script regarding gif files (it used to enter an infinite loop)

REVIEW URL http://reviewboard.infoarena.ro/r/181/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/common/attachment.php

    r1155 r1159  
    178178            $trans_col = imagecolortransparent($image); 
    179179            imagepalettecopy($image_resized, $image); 
    180             imagefill($image_resized, 0, 0, $trans_col); 
     180            if ($trans_col != -1) { 
     181                imagefill($image_resized, 0, 0, $trans_col); 
     182            } 
    181183            imagecolortransparent($image_resized, $trans_col); 
    182184            imagecopyresampled($image_resized, $image, 0, 0, 0, 0, 
Note: See TracChangeset for help on using the changeset viewer.