From 4a30c7a2ca34b30dfebdd4435b7b62760bf8fda8 Mon Sep 17 00:00:00 2001 From: SecretR Date: Mon, 18 Mar 2013 12:26:55 +0200 Subject: [PATCH] thumbUrl method now converts shortcode paths (testing required) --- e107_handlers/e_parse_class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 59b1942dc..4736b06b5 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -1813,9 +1813,11 @@ class e_parse extends e_parser 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. //XXX This is bad. + if(substr($url,0,3)=="{e_") // Fix for broken links that use {e_MEDIA} etc. { - //$url = $this->replaceConstants($url,'abs'); + //$url = $this->replaceConstants($url,'abs'); + // always switch to 'nice' urls when SC is used + $url = str_replace($tp->getUrlConstants('sc'), $tp->getUrlConstants('raw'), $url); } if(!is_array($options))