1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Better BC fix for sitelink images.

This commit is contained in:
Cameron
2014-05-31 16:10:54 -07:00
parent f771a39171
commit 27c47f77e3
2 changed files with 12 additions and 6 deletions

View File

@@ -2782,9 +2782,9 @@ class e_parser
{
return;
}
$ext = pathinfo($icon, PATHINFO_EXTENSION);
if(!$ext || $ext == 'glyph') // Bootstrap or Font-Awesome.
{
return $this->toGlyph($icon,$parm);
@@ -2800,14 +2800,18 @@ class e_parser
}
elseif(vartrue($parm['legacy']))
{
if(is_readable($parm['legacy'].$icon))
$legacyPath = $parm['legacy'].$icon;
$filePath = $this->replaceConstants($legacyPath,'rel');
if(is_readable($filePath))
{
$path = $parm['legacy'].$icon;
$path = $this->replaceConstants($legacyPath,'full');
}
else
{
$log = e107::getAdminLog();
$log->addDebug('Broken Icon Path: '.$icon, false)->save('IMALAN_00');
$log->addDebug('Broken Icon Path: '.$legacyPath, false)->save('IMALAN_00');
}
}
@@ -2815,6 +2819,8 @@ class e_parser
{
$path = $icon;
}
return "<img class='icon' src='".$path."' alt='".basename($path)."' />";
}

View File

@@ -1768,7 +1768,7 @@ class navigation_shortcodes extends e_shortcode
// else
{
//$path = e107::getParser()->replaceConstants($this->var['link_button'], 'full', TRUE);
return $tp->toIcon($this->var['link_button'],array('space'=>' ', 'legacy'=>e_IMAGE_ABS."icons/"));
return $tp->toIcon($this->var['link_button'],array('space'=>' ', 'legacy'=>"{e_IMAGE}icons/"));
// return "<img class='icon' src='".$path."' alt='' />";
}