Index: branches/5.1.x/core/units/helpers/file_helper.php =================================================================== diff -u -N -r13569 -r13667 --- branches/5.1.x/core/units/helpers/file_helper.php (.../file_helper.php) (revision 13569) +++ branches/5.1.x/core/units/helpers/file_helper.php (.../file_helper.php) (revision 13667) @@ -1,6 +1,6 @@ Application->BaseURL(), '/') . $url; + } + + /** + * Transforms given url to path to it + * + * @param string $url + * @return string + */ + function urlToPath($url) + { + $base_url = rtrim($this->Application->BaseURL(), '/'); + $path = preg_replace('/^' . preg_quote($base_url, '/') . '(.*)/', FULL_PATH . '\\1', $url); + + return str_replace('/', DIRECTORY_SEPARATOR, rawurldecode($path)); + } } \ No newline at end of file