});
$form->tmpl_param("page_preview",
htmlize($page, $type,
- linkify($page, "",
- preprocess($page, $page,
- filter($page, $page, $content), 0, 1))));
+ linkify($page, "/",
+ preprocess($page, "/",
+ filter($page, "/", $content), 0, 1))));
# previewing may have created files on disk
saveindex();
}
$dir=~s![^/]+/+$!!;
push @page_locs, $dir.$page;
}
+
+ push @page_locs, "$config{userdir}/$page"
+ if length $config{userdir};
}
- push @page_locs, "$config{userdir}/$page"
- if length $config{userdir};
@page_locs = grep {
! exists $pagecase{lc $_}
if (! @page_locs) {
# hmm, someone else made the page in the
# meantime?
- redirect($q, "$config{url}/".htmlpage($page));
- return;
+ if ($form->submitted eq "Preview") {
+ # let them go ahead with the edit
+ # and resolve the conflict at save
+ # time
+ @page_locs=$page;
+ }
+ else {
+ redirect($q, "$config{url}/".htmlpage($page));
+ return;
+ }
}
my @editable_locs = grep {