Skip to content

Commit

Permalink
Simpler ID trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Nov 13, 2010
1 parent 3903be5 commit 709b106
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions inc/search.php
Expand Up @@ -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;
}

Expand Down

0 comments on commit 709b106

Please sign in to comment.