[Corona] fixing basepath as slash replaces all slashes in a filepath

Review Request #396 — Created Nov. 12, 2015 and discarded

smillernl
Lunr
lunr

Corona: fixing basepath as slash replaces all slashes in a filepath

The filetime would be incorrect if $this->request->base_path = '/'; due to the str_replace replacing all occurences in the file path.



pprkut
  1. Fix looks good, but the same fix is probably also necessary for css files.
    Also, tests are missing.

  2. 
      
smillernl
pprkut
  1. Is there a specific reason you're using preg_replace instead of str_replace? I have a local version here utilizing str_replace and it seems to work just fine.
    If we need preg_replace then at the very least a unit test for such a case is missing.

    1. I recall not getting the M2mobi website problem persisting with everything I could come up with on str_replace. Might have overlooked something though, I'll look into it later.

  2. 
      
smillernl
Review request changed

Status: Discarded

Loading...