1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 18:14:26 +02:00

Fix for $tp->toFile()

This commit is contained in:
Cameron
2017-01-23 10:31:30 -08:00
parent 43d0211590
commit 9ebc0bfa92
3 changed files with 30 additions and 7 deletions

View File

@@ -3665,13 +3665,17 @@ class e_parser
/**
* Take a file-path and convert it to a download link.
* @todo
* @param $text
* @return string
*/
public function toFile($text, $parm=array())
{
$link = e_HTTP."request.php?".str_replace('{e_MEDIA_FILE}', '',$text);
$srch = array(
'{e_MEDIA_FILE}' => 'e_MEDIA_FILE/',
'{e_PLUGIN}' => 'e_PLUGIN/'
);
$link = e_HTTP."request.php?file=". str_replace(array_keys($srch), $srch,$text);
if(!empty($parm['raw']))
{