Skip to content

Using prepend on the download does not work... #11

@nevsie

Description

@nevsie

At line 66:
$data = file_get_contents($_SERVER['DOCUMENT_ROOT'] . $file);

you are not getting the right location as prepend is not included. maybe something like:
$data = file_get_contents($_SERVER['DOCUMENT_ROOT'] . $prepend . $file);

I would also check parameters and return false or blank too?

$restricted = ($this->EE->TMPL->fetch_param('restricted')) ? $this->EE->TMPL->fetch_param('restricted') : '';
$prepend = ($this->EE->TMPL->fetch_param('prepend')) ? $this->EE->TMPL->fetch_param('prepend') : '';
$remove_path = ($this->EE->TMPL->fetch_param('remove_path')) ? $this->EE->TMPL->fetch_param('remove_path') : '';

But handy and works other than that, N

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions