1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Handle on-site images better

This commit is contained in:
SteveD 2013-01-28 21:31:10 +00:00
parent 4c9e0c3ea4
commit 9ce5354f76

View File

@ -340,6 +340,13 @@ class e107PDF extends TCPDF
*/
function filePathModify($fileName, $source = '')
{
// This handles the fact that local images use absolute links in web pages
if (strpos($fileName, SITEURL) === 0)
{
$fileName = e_BASE.str_replace(SITEURL, '', $fileName);
return $fileName;
}
// Leave off-site links unchanged
if (strpos($fileName, 'http://') === 0) return $fileName;
if (strpos($fileName, 'https://') === 0) return $fileName;