1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +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

@@ -2800,14 +2800,18 @@ class e_parser
} }
elseif(vartrue($parm['legacy'])) 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 else
{ {
$log = e107::getAdminLog(); $log = e107::getAdminLog();
$log->addDebug('Broken Icon Path: '.$icon, false)->save('IMALAN_00'); $log->addDebug('Broken Icon Path: '.$legacyPath, false)->save('IMALAN_00');
} }
} }
@@ -2816,6 +2820,8 @@ class e_parser
$path = $icon; $path = $icon;
} }
return "<img class='icon' src='".$path."' alt='".basename($path)."' />"; return "<img class='icon' src='".$path."' alt='".basename($path)."' />";
} }

View File

@@ -1768,7 +1768,7 @@ class navigation_shortcodes extends e_shortcode
// else // else
{ {
//$path = e107::getParser()->replaceConstants($this->var['link_button'], 'full', TRUE); //$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='' />"; // return "<img class='icon' src='".$path."' alt='' />";
} }