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:
@@ -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']))
|
||||
{
|
||||
|
Reference in New Issue
Block a user