Skip to content
Snippets Groups Projects
Commit 709b1063 authored by Adrian Lang's avatar Adrian Lang
Browse files

Simpler ID trimming

parent 3903be5d
No related branches found
No related tags found
No related merge requests found
......@@ -511,8 +511,7 @@ function pathID($path,$keeptxt=false){
$id = utf8_decodeFN($path);
$id = str_replace('/',':',$id);
if(!$keeptxt) $id = preg_replace('#\.txt$#','',$id);
$id = preg_replace('#^:+#','',$id);
$id = preg_replace('#:+$#','',$id);
$id = trim($id, ':');
return $id;
}
......
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