1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 09:04:38 +02:00

Issue #5191 Static URL mapping.

This commit is contained in:
camer0n
2024-02-07 13:06:00 -08:00
parent 004da27010
commit d20326a2ec
2 changed files with 54 additions and 2 deletions

View File

@@ -63,8 +63,10 @@ class e_parse
protected $staticUrl;
protected $staticUrlMap = [];
/** @var array Stored relative paths - used by replaceConstants() */
private $relativePaths = array();
private $relativePaths = [];
// BBcode that contain preformatted code.
@@ -2478,6 +2480,9 @@ class e_parse
$ret = str_replace(e_MEDIA_ABS, $http . $base . e107::getFolder('media'), $ret);
}
$key = ltrim(eHelper::dasherize($path), '/');
$this->staticUrlMap[$key] = $ret;
return $ret;
}
@@ -2492,6 +2497,11 @@ class e_parse
$this->staticUrl = $url;
}
public function getStaticUrlMap()
{
return $this->staticUrlMap;
}
/**
* Generate an auto-sized Image URL.
*