Skip to content
Snippets Groups Projects
Commit 64026cfd authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: use all character

parent e1ab6c05
Branches
Tags
No related merge requests found
...@@ -117,7 +117,7 @@ function dol_buildpath($path,$mode=0) ...@@ -117,7 +117,7 @@ function dol_buildpath($path,$mode=0)
// FIXME Trying to know if a file on disk exist by forging path on disk from url // FIXME Trying to know if a file on disk exist by forging path on disk from url
// works only for some web server and some setup. This is bugged when // works only for some web server and some setup. This is bugged when
// using proxy, rewriting, virtual path, etc... // using proxy, rewriting, virtual path, etc...
preg_match('/^([^<]+\.php)$/i',$path,$regs); // Why a "<" char ? preg_match('/^([.*]+\.php)$/i',$path,$regs);
if (! empty($regs[1])) $path = $regs[1]; if (! empty($regs[1])) $path = $regs[1];
if (! file_exists(DOL_DOCUMENT_ROOT.$path)) $res = DOL_URL_ROOT_ALT.$path; if (! file_exists(DOL_DOCUMENT_ROOT.$path)) $res = DOL_URL_ROOT_ALT.$path;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment