1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00
This commit is contained in:
Cameron 2019-03-06 12:10:53 -08:00
parent 21a213662c
commit d05d4f6406
2 changed files with 8 additions and 4 deletions

View File

@ -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();

View File

@ -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))
{