From b37133871d15daa2846f013f59e7e6abc35387aa Mon Sep 17 00:00:00 2001 From: rich Date: Mon, 14 Aug 2006 18:25:29 +0000 Subject: [PATCH] Fix the bug with unrecognised extension pages turning up as redlinks in the superdirs. --- scripts/page.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/page.ml b/scripts/page.ml index 82fa0e7..68fb627 100644 --- a/scripts/page.ml +++ b/scripts/page.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: page.ml,v 1.55 2006/08/14 17:56:59 rich Exp $ + * $Id: page.ml,v 1.56 2006/08/14 18:25:29 rich Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -221,7 +221,11 @@ let run r (q : cgi) dbh hostid let url, redlink = match Wikilib.generate_url_of_title r dbh hostid path with | Wikilib.GenURL_Duplicate url -> url, None - | Wikilib.GenURL_OK url -> url, Some path + | Wikilib.GenURL_OK url -> + (* Is it an extension page? *) + (match get_extension url with + | Some _ -> url, None (* extension page *) + | None -> url, Some path (* redlink *)) | Wikilib.GenURL_BadURL | Wikilib.GenURL_TooShort -> raise Exit in pathsofar := path; -- 1.8.3.1