Filelist generates wrong links when Yellow is installed in a subdirectory
Closed this issue · 2 comments
schulle4u commented
If Yellow is installed in a subdirectory, e.g. https://example.com/yellow/
, the filelist doesn't recognize the subdirectory and tries to download files from document root. I suggest to add serverBase
to the path on line 30, this should fix the issue:
$fileLoc = $this->yellow->system->get("serverBase").$this->yellow->system->get("filelistLocation").$filePath;
Steffen
GiovanniSalmeri commented
Thank you very much @schulle4u ! Fixed with 92ebbac
markseuffert commented
Btw, in case someone enters [filelist ../../system/settings//]
you can do something like:
$filePath = $this->yellow->toolbox->normaliseTokens($filePath);
if ($this->yellow->lookup->isValidFile($filePath) && is_dir($filePath)) {
//TODO: do more here
}