sruupl / batflat

Lightweight, fast and easy CMS for free. Bootstrap ready. https://batflat.org
MIT License
135 stars 54 forks source link

Fixed a bug, when a tag with the same name as a folder didn't display #51

Closed michu2k closed 5 years ago

michu2k commented 5 years ago

Issue #49 There was a problem in the Router.php, in the execute function. There was a function str_replace which replaced all occurrences of the search string, so when the folder and tag had the same name, then tag didn't display, because it was cut. Function str_replace has been replaced by preg_replace with possible replacements set to 1, so it's will be deleting only one match.

This fix should also work for the blog path (./blog/blog/post/....)