From d05d4f640698604cb04c0179300b2dcf06c72371 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 6 Mar 2019 12:10:53 -0800 Subject: [PATCH] Fixes #3712 --- e107_handlers/e_parse_class.php | 2 +- e107_handlers/media_class.php | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 5b4d3e8fb..39cb255b7 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -4388,7 +4388,7 @@ class e_parser return $this->toGlyph($icon,$parm); } - if(strpos($icon,'e_MEDIA')!==FALSE) + if(strpos($icon,'e_MEDIA_IMAGE')!==false) { $path = $this->thumbUrl($icon); $dimensions = $this->thumbDimensions(); diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php index 1a8548e55..9aaf36ffd 100644 --- a/e107_handlers/media_class.php +++ b/e107_handlers/media_class.php @@ -1332,8 +1332,12 @@ class e_media $img_data = $this->mediaData($oldpath); // Basic File Info only - - if(!$typePath = $this->getPath($img_data['media_type'], $uploadPath)) + + if($category === '_icon') + { + $typePath = rtrim(e_MEDIA_ICON,'/'); + } + elseif(!$typePath = $this->getPath($img_data['media_type'], $uploadPath)) { $this->log("Line: ".__LINE__." Couldn't generate path from file info:".$oldpath); $mes->addError("Couldn't generate path from file info:".$oldpath); @@ -1365,7 +1369,7 @@ class e_media $img_data['media_caption'] = vartrue($new_data['media_caption']); $img_data['media_category'] = vartrue($category,'_common_image'); $img_data['media_description'] = vartrue($new_data['media_description']); - $img_data['media_userclass'] = '0'; + $img_data['media_userclass'] = '0'; if($sql->insert("core_media",$img_data)) {