* Detect the case of two people independently creating the same page at the
same time, and let the second person resolve the conflict.master
parent
50a9ef4753
commit
26213f8ee4
|
@ -497,6 +497,21 @@ sub cgi_editpage ($$) { #{{{
|
|||
print $form->render(submit => \@buttons);
|
||||
return;
|
||||
}
|
||||
elsif (-e "$config{srcdir}/$file" &&
|
||||
$form->field("do") eq "create") {
|
||||
$form->tmpl_param("creation_conflict", 1);
|
||||
$form->field(name => "do", value => "edit", force => 1);
|
||||
$form->tmpl_param("page_select", 0);
|
||||
$form->field(name => "page", type => 'hidden');
|
||||
$form->field(name => "type", type => 'hidden');
|
||||
$form->title(sprintf(gettext("editing %s"), $page));
|
||||
$form->field("editcontent",
|
||||
value => readfile("$config{srcdir}/$file").
|
||||
"\n\n\n".$form->field("editcontent"),
|
||||
force => 1);
|
||||
print $form->render(submit => \@buttons);
|
||||
return;
|
||||
}
|
||||
|
||||
my $content=$form->field('editcontent');
|
||||
|
||||
|
|
|
@ -8,8 +8,10 @@ ikiwiki (1.46) UNRELEASED; urgency=low
|
|||
with the same name already exists, and generally simplify the edit code.
|
||||
* Make ikiwiki -verbose -setup with a setup file that enabled syslog logging
|
||||
output the verbose build log to stdout, rather than to the syslog.
|
||||
* Detect the case of two people independently creating the same page at the
|
||||
same time, and let the second person resolve the conflict.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sat, 17 Mar 2007 19:31:31 -0400
|
||||
-- Joey Hess <joeyh@debian.org> Sat, 17 Mar 2007 19:56:04 -0400
|
||||
|
||||
ikiwiki (1.45) unstable; urgency=low
|
||||
|
||||
|
|
|
@ -42,6 +42,17 @@ Perhaps someone else has deleted it or moved it. If you want to recreate
|
|||
this page with your text, click "Save Page" again.
|
||||
</p>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="CREATION_CONFLICT">
|
||||
<p>
|
||||
<b>While you were creating this page, someone else independently created a page
|
||||
with the same name.</b>
|
||||
</p>
|
||||
<p>
|
||||
The edit box below contains the page's current content, followed by the
|
||||
content you entered previously, to allow you to merge the two contents
|
||||
together before saving.
|
||||
</p>
|
||||
</TMPL_IF>
|
||||
<TMPL_VAR FORM-START>
|
||||
<div class="header">
|
||||
<span><TMPL_VAR INDEXLINK>/ <TMPL_VAR FORM-TITLE></span>
|
||||
|
|
Loading…
Reference in New Issue