- let url, title =
- match pt with
- Page url -> url, url
- | Title title ->
- match Wikilib.generate_url_of_title dbh hostid title with
- Wikilib.GenURL_OK url -> url, title
- | Wikilib.GenURL_Duplicate url ->
- q#redirect ("http://" ^ hostname ^ "/" ^ url);
- return ()
- | Wikilib.GenURL_TooShort | Wikilib.GenURL_BadURL ->
- error ~back_button:true ~title:"Bad page name"
- dbh hostid q
- "The page name supplied is too short or invalid.";
- return () in
+ (* Just check the title. *)
+ (match pt with
+ | Page url -> ()
+ | Title title ->
+ match Wikilib.generate_url_of_title dbh hostid title with
+ | Wikilib.GenURL_OK url -> ()
+ | Wikilib.GenURL_Duplicate url ->
+ q#redirect ("http://" ^ hostname ^ "/" ^ url)
+ | Wikilib.GenURL_TooShort | Wikilib.GenURL_BadURL ->
+ error ~back_button:true ~title:"Bad page name"
+ dbh hostid q
+ "The page name supplied is too short or invalid.";
+ return ()
+ );