Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a bug that would not display an image if the source image width…

… is the same as the requested resize width.
  • Loading branch information...
commit 06ad37b8ea6c0426b300432b55e8d348d4b65c38 1 parent ce407e0
@webtechnick webtechnick authored
Showing with 5 additions and 4 deletions.
  1. +3 −2 readme.txt
  2. +2 −2 views/helpers/file_upload.php
View
5 readme.txt
@@ -1,5 +1,5 @@
AUTHOR: Nick Baker
-VERSION: 6.1.0
+VERSION: 6.1.1
EMAIL: nick@webtechnick.com
Get it
@@ -17,7 +17,8 @@ BLOG ARTICLE:
http://www.webtechnick.com/blogs/view/221/CakePHP_File_Upload_Plugin
CHANGELOG:
- 6.1.1: Allow users to change the uploadDir outside of WEB_ROOT by changing setting forceWebroot to false in the configuration.
+ 6.1.1: Fixed a bug that would not display an image if the source image is the same width as the resize image requested.
+ 6.1.0: Allow users to change the uploadDir outside of WEB_ROOT by changing setting forceWebroot to false in the configuration.
Default is still webroot/files. Updated typos in the README.txt
6.0.0: Change the way file uploads types are checked. Now checking extension along with filetypes.
: ****** Please read migration guide. migration_guide_5_0_x_to_6_0_x.txt ******
View
4 views/helpers/file_upload.php
@@ -4,7 +4,7 @@
* This helper REQUIRES the FileUploadComponent.
*
* @author: Nick Baker
- * @version: 5.0.0
+ * @version: 6.1.1
* @email: nick@webtechnick.com
* @link: http://www.webtechnick.com/blogs/view/221/CakePHP_File_Upload_Plugin
*
@@ -268,7 +268,7 @@ function _resizeImage(){
*/
function _htmlImage(){
if(!$this->_isOutsideSource() && $this->options['autoResize'] && $this->options['width'] > 0){
- if(isset($this->newImage) && $this->newImage->imgWidth && $this->newImage->imgWidth < $this->options['width']){
+ if(isset($this->newImage) && $this->newImage->imgWidth && $this->newImage->imgWidth <= $this->options['width']){
$image = $this->_getImagePath();
}
else {
Please sign in to comment.
Something went wrong with that request. Please try again.