Changeset 256 for trunk/lib


Ignore:
Timestamp:
May 9, 2007 3:06:24 AM (17 years ago)
Author:
quinn
Message:

Minor bug fixes.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/ImageThumb.inc.php

    r247 r256  
    226226       
    227227        return $final_spec;
     228    }
     229   
     230    /*
     231    * Retreive a value of a thumb specification.
     232    *
     233    * @access   public
     234    * @param    string  $key    Key to return. See _default_image_specs above for a list.
     235    * @param    int     $index  The index in the spec array of the value to retreive. The first if not specified.
     236    * @return   mixed           Value of requested index.
     237    * @author   Quinn Comendant <quinn@strangecode.com>
     238    * @version  1.0
     239    * @since    08 May 2007 15:26:39
     240    */
     241    function getSpec($key, $index=null)
     242    {
     243        $index = isset($index) ? $index : 0;
     244        return $this->_image_specs[$index][$key];
    228245    }
    229246
     
    570587        // Sharpen image using a custom filter matrix.
    571588        if (phpversion() > '5.1' && true === $spec['sharpen'] && $spec['sharpen_value'] > 0) {
    572             $sharpen_value = round((((48 - 10) / (100 - 1)) * (100 - $spec['sharpen_value'])) + 10);
     589            $sharpen_value = round((((48 - 10) / (100 - 1)) * (100 - $spec['sharpen_value'])) + 10); /// WTF is this math?
    573590            imageconvolution($dest_image_resource, array(array(-1,-1,-1),array(-1,$sharpen_value,-1),array(-1,-1,-1)), ($sharpen_value - 8), 0);
    574591        }
  • trunk/lib/Upload.inc.php

    r247 r256  
    117117     * @access  public
    118118     * @param   string  $form_name          The name of the form to process.
    119      * @param   string  $custom_file_name   The new name of the file. An array of filename in the case of multiple files.
     119     * @param   string  $custom_file_name   The new name of the file. An array of filenames in the case of multiple files.
    120120     * @return  mixed   Returns FALSE if a major error occured preventing any file uploads.
    121121     *                  Returns an empty array if any minor errors occured or no files were found.
     
    186186            } else {
    187187                // Multiple upload. Final file names must be array.
    188                 if (isset($custom_file_name) && is_array($custom_file_name) && is_array($custom_file_name[$i]) && '' != $custom_file_name[$i]) {
     188                if (isset($custom_file_name) && is_array($custom_file_name) && '' != $custom_file_name[$i]) {
    189189                    // Valid custom file name.
    190190                    $file_name = $custom_file_name[$i];
Note: See TracChangeset for help on using the changeset viewer.