mirror of
https://github.com/e107inc/e107.git
synced 2025-01-31 04:07:55 +01:00
Issue #5387 Tweak for tests.
This commit is contained in:
parent
46d7124839
commit
9d328545d0
@ -4395,18 +4395,21 @@ class e_parse
|
||||
|
||||
if (!empty($options['base64'])) // embed image data into URL.
|
||||
{
|
||||
$content = e107::getFile()->getRemoteContent($url);
|
||||
$content = '';
|
||||
|
||||
if(!empty($file))
|
||||
{
|
||||
$content = file_get_contents($file);
|
||||
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
}
|
||||
else
|
||||
{
|
||||
$content = e107::getFile()->getRemoteContent($url);
|
||||
$ext = strtolower(pathinfo($url, PATHINFO_EXTENSION));
|
||||
}
|
||||
|
||||
if (!empty($content))
|
||||
{
|
||||
if(!empty($file))
|
||||
{
|
||||
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
}
|
||||
else
|
||||
{
|
||||
$ext = strtolower(pathinfo($url, PATHINFO_EXTENSION));
|
||||
}
|
||||
|
||||
$url = 'data:image/' . $ext . ';base64,' . base64_encode($content);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user