Changeset 477 for trunk/lib/ImageThumb.inc.php
- Timestamp:
- May 3, 2014 3:13:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/ImageThumb.inc.php
r468 r477 128 128 if (!is_dir($params['source_dir'])) { 129 129 $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', '>=')) { 131 131 // Recursive. 132 132 mkdir($params['source_dir'], isset($params['dest_dir_perms']) ? $params['dest_dir_perms'] : $this->getParam('dest_dir_perms'), true); … … 607 607 608 608 // 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) { 610 610 $sharpen_value = round((((48 - 10) / (100 - 1)) * (100 - $spec['sharpen_value'])) + 10); // TODO: WTF is this math? 611 611 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.