From d633f5c23940141aae4f3d22bf03fd80b36adbeb Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Fri, 19 Aug 2011 23:39:44 +0000 Subject: [PATCH] Fix for broken thumbnails while using {e_xxxx} --- e107_handlers/e_parse_class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index a68f9c96c..9db7ada0b 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -1755,6 +1755,11 @@ class e_parse public function thumbUrl($url, $options = array(), $raw = false, $full = false) { + if(substr($url,0,3)=="{e_") // Fix for broken links that use {e_MEDIA} etc. + { + $url = $this->replaceConstants($url); + } + if(!is_array($options)) { parse_str($options, $options); @@ -1763,6 +1768,7 @@ class e_parse if($raw) $url = $this->createConstants($url, 'mix'); $thurl = ($full ? SITEURL : e_HTTP).'thumb.php?src='.$url.'&'; + if(vartrue($options['aw']) || vartrue($options['ah'])) { $thurl .= 'aw='.((integer) vartrue($options['aw'], 0)).'&ah='.((integer) vartrue($options['ah'], 0));