From 0fc0a5c876fe11602ce61a6d0f83808efccbd4e8 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 8 Jan 2014 03:43:17 -0800 Subject: [PATCH] Additional checks added before creating a watermark. resizeUp option enabled. --- thumb.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thumb.php b/thumb.php index 0bdb010ba..5704c4f9f 100644 --- a/thumb.php +++ b/thumb.php @@ -268,7 +268,7 @@ class e_thumbpage try { $thumb = PhpThumbFactory::create($this->_src_path); - $thumb->setOptions(array('correctPermissions' => true)); + $thumb->setOptions(array('correctPermissions' => true, 'resizeUp'=>true)); } catch (Exception $e) { @@ -293,11 +293,11 @@ class e_thumbpage // Watermark Option - See admin->MediaManager->prefs for details. - if($this->_watermark['activate'] < $options['w'] + if(($this->_watermark['activate'] < $options['w'] || $this->_watermark['activate'] < $options['aw'] || $this->_watermark['activate'] < $options['h'] || $this->_watermark['activate'] < $options['ah'] - ) + ) && $this->_watermark['activate'] > 0 && $this->_watermark['font'] !='') { $tp = e107::getParser(); $this->_watermark['font'] = $tp->createConstants($this->_watermark['font'], 'mix');