Ignore:
Timestamp:
May 3, 2014 3:13:19 PM (10 years ago)
Author:
anonymous
Message:

Added cookie storage to Prefs(). Created App->addCookie method. Improved PHP version checks.

File:
1 edited

Legend:

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

    r468 r477  
    128128                if (!is_dir($params['source_dir'])) {
    129129                    $app->logMsg(sprintf('Attempting to auto-create source directory: %s', $params['source_dir']), LOG_NOTICE, __FILE__, __LINE__);
    130                     if (phpversion() > '5') {
     130                    if (version_compare(PHP_VERSION, '5.0.0', '>=')) {
    131131                        // Recursive.
    132132                        mkdir($params['source_dir'], isset($params['dest_dir_perms']) ? $params['dest_dir_perms'] : $this->getParam('dest_dir_perms'), true);
     
    607607
    608608        // Sharpen image using a custom filter matrix.
    609         if (phpversion() > '5.1' && true === $spec['sharpen'] && $spec['sharpen_value'] > 0) {
     609        if (version_compare(PHP_VERSION, '5.1.0', '>=') && true === $spec['sharpen'] && $spec['sharpen_value'] > 0) {
    610610            $sharpen_value = round((((48 - 10) / (100 - 1)) * (100 - $spec['sharpen_value'])) + 10); // TODO: WTF is this math?
    611611            imageconvolution($dest_image_resource, array(array(-1, -1, -1), array(-1, $sharpen_value, -1),array(-1, -1, -1)), ($sharpen_value - 8), 0);
Note: See TracChangeset for help on using the changeset viewer.