Dolibarr/dolibarr — pull request #1084 by csalvador (2013-07-09 16:57:24+00:00)
Title: fix dol_buildpath failing when processing path such as file.php?id=__ID_...

dol_buildpath fails to return the good path when the parameter is something like '/mymodule/mypage.php?id=__ID__' with mymodule in the 'extensions' folder. It doesn't add the 'extensions' folder to the path.
The '?id=__ID__' part makes the file_exists test return false so I replaced $path by $regs[1] which value doesn't contain it.