From 0d8ea6141bc1a7136d25b6377e9d1d04f19664a9 Mon Sep 17 00:00:00 2001 From: chris <chris@jalakai.co.uk> Date: Fri, 25 Aug 2006 16:41:12 +0200 Subject: [PATCH] update wikiFN with third paramter, $clean value defaults to true patch also includes an update to idx_parseIndexLine to make use of the new parameter - the index file (if built by DokuWiki's methods) will contain already "clean" IDs. darcs-hash:20060825144112-9b6ab-55adc71cf55bb58468fb3f0b03b9001ab149a82b.gz --- inc/indexer.php | 2 +- inc/pageutils.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 4a5d0b4e2..9af4b5b84 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -337,7 +337,7 @@ function idx_parseIndexLine(&$page_idx,$line){ $doc = trim($page_idx[$doc]); if(!$doc) continue; // make sure the document still exists - if(!@file_exists(wikiFN($doc))) continue; + if(!@file_exists(wikiFN($doc,'',false))) continue; $result[$doc] = $cnt; } diff --git a/inc/pageutils.php b/inc/pageutils.php index 2055cf2cc..c2cd29bf1 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -140,9 +140,9 @@ function noNS($id) { * * @author Andreas Gohr <andi@splitbrain.org> */ -function wikiFN($id,$rev=''){ +function wikiFN($id,$rev='',$clean=true){ global $conf; - $id = cleanID($id); + if ($clean) $id = cleanID($id); $id = str_replace(':','/',$id); if(empty($rev)){ $fn = $conf['datadir'].'/'.utf8_encodeFN($id).'.txt'; -- GitLab