Skip to content
Snippets Groups Projects
Commit be4eef68 authored by infoneo's avatar infoneo
Browse files

Fixed problems with a dots in a filenames

parent 8f19c5ec
No related branches found
No related tags found
No related merge requests found
......@@ -176,16 +176,22 @@ class Mapper
$last= end($pathElements);
$parts = pathinfo($last);
if ((preg_match('~[-\w]+~', $parts['filename'])) && (preg_match('~[-\w]+~', $parts['extension']))){
$filename = $parts['filename'];
$extension = $parts['extension'];
if ((preg_match('~[-\w]+~', $filename)) && (preg_match('~[-\w]+~', $extension))){
// rip off the extension ext from last element
$filename = $parts['filename'];
array_pop($pathElements);
array_push($pathElements, $filename);
// rip off the extension ext from last element
array_pop($pathElements);
array_push($pathElements, $filename);
} else {
unset($parts['extension']);
if (isset($parts['extension'])) {
unset($parts['extension']);
}
}
foreach ($pathElements as $pathElement) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment