(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* 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
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;