From 709b10639d1fe76508c0f31bd7983b3a5beee605 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sat, 13 Nov 2010 16:27:10 +0100 Subject: Simpler ID trimming --- inc/search.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'inc/search.php') diff --git a/inc/search.php b/inc/search.php index 03abec0c0..a6787c5d2 100644 --- a/inc/search.php +++ b/inc/search.php @@ -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; } -- cgit v1.2.3