Bug #14468
closedindexed_search doesn't index external files
0%
Description
The function extractLinks() in class.indexer.php gets all links from the current page and indexes them if they are found on the file system.
It does check for existence of the files in a wrong way, though. It extracts for example the link "/uploads/abc.pdf" and then uses is_file() to check if that file exists. But to suceed it would have to prepend the virtual server root.
The function indexRegularDocument() works that way to check if the file exists. So the best fix might be to just remove the elseif clause in extractLinks() and replace it with an else clause.
Because the then executed function indexRegularDocument() does check if the given file exists, no harm is done.
I have changed the function in my installation and it works perfectly for PDF and DOC files.
(issue imported from #M641)