Skip to content
Snippets Groups Projects
Commit 6798a86a authored by Andreas Gohr's avatar Andreas Gohr
Browse files

trim pagename returned by ft_pageLookup

darcs-hash:20061124215413-7ad00-f2bd46b7edf70660cc3e0274bd222eafba1edbc6.gz
parent e9208eb1
No related branches found
No related tags found
No related merge requests found
......@@ -150,7 +150,7 @@ function ft_pageLookup($id,$pageonly=true){
global $conf;
$id = preg_quote($id,'/');
$pages = file($conf['indexdir'].'/page.idx');
$pages = array_values(preg_grep('/'.$id.'/',$pages));
if($id) $pages = array_values(preg_grep('/'.$id.'/',$pages));
$cnt = count($pages);
for($i=0; $i<$cnt; $i++){
......@@ -176,6 +176,7 @@ function ft_pageLookup($id,$pageonly=true){
}
}
$pages = array_map('trim',$pages);
sort($pages);
return $pages;
}
......
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