don't special case preview

Whenever the edit form is submitted, but not saved, the page location
select should reduce to the currently selected value. This was only done
when previewing before, but is also needed in order to support the case of
adding an attachment to a page that is just being created.

Before this change, the attachment plugin would get a weird value in
$form->field("page"), that did not reflect the actual page location.
master
Joey Hess 2008-10-02 12:42:46 -04:00
parent 45a2074071
commit e0fd02acf1
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ sub cgi_editpage ($$) { #{{{
file_pruned($from, $config{srcdir}) || file_pruned($from, $config{srcdir}) ||
$from=~/^\// || $from=~/^\// ||
$absolute || $absolute ||
$form->submitted eq "Preview") { $form->submitted) {
@page_locs=$best_loc=$page; @page_locs=$best_loc=$page;
} }
else { else {