Changeset 2033 in ExiteCMS for trunk/administration/settings_image.php


Ignore:
Timestamp:
11/15/08 20:51:44 (4 years ago)
Author:
webmaster
Message:

added svn properties to all files, and svn:keywords to .php and .tpl files
made sure all .php and .tpl file have a uniform copyright header

Location:
trunk/administration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration

    • Property bugtraq:logregex set to (?:ticket: *|#)(\d+) *(?:, *(\d+))*
    • Property bugtraq:url set to http://www.exitecms.org/trac/ticket/%BUGID%
  • trunk/administration/settings_image.php

    • Property svn:keywords changed from Rev Author Date Id to Date Revision Author Id
    • Property bugtraq:logregex set to (?:ticket: *|#)(\d+) *(?:, *(\d+))*
    • Property bugtraq:url set to http://www.exitecms.org/trac/ticket/%BUGID%
    r1935 r2033  
    8888                @unlink(PATH_PHOTOS.$data['photo_thumb']); 
    8989            } 
    90             if ($imagefile[0] > $settings2['thumb_w'] || $imagefile[1] > $settings2['thumb_h']) { 
     90            if ($imagefile[0] > $settings2['thumb_w']) { 
     91                // calculate a new thumb height 
     92                $thumb_h = floor(($settings2['thumb_w'] / $imagefile[0]) * $imagefile[1]); 
    9193                // Generate a new intermediate image 
    9294                $data['photo_thumb'] = str_replace(".img", ".thumb.img", $data['photo_original']); 
    93                 createthumbnail($imagefile[2], PATH_PHOTOS.$data['photo_original'], PATH_PHOTOS.$data['photo_thumb'], $settings2['thumb_w'], $settings2['thumb_h']); 
     95                createthumbnail($imagefile[2], PATH_PHOTOS.$data['photo_original'], PATH_PHOTOS.$data['photo_thumb'], $settings2['thumb_w'], $thumb_h); 
    9496                $result2 = dbquery("UPDATE ".$db_prefix."photos SET photo_thumb = '".$data['photo_thumb']."' WHERE photo_id = ".$data['photo_id']); 
    9597            } else { 
Note: See TracChangeset for help on using the changeset viewer.