This was so convenient to set up. Wikis are strangely fun. I do have a question. Attempts to delete pages result in a lock failure. Apparently a known bug, with a fix, even. But, uh, where do I find edit.pm and database.pm to apply the fixes? Or at least look at them to see if what to do is obvious. Or do these have to be fixed by an admin? Here's the fix:
http://www.kwiki.org/index.cgi?PatchDeleteUnlockBug
In reply to:
Fixes a bug in version 0.18 where deleting fails due to an extra unlock call in the Edit.pm code. Also (perhaps unnecessarily) fixes the cgi failing due to extra unlocks in the first place.
--- Database.pm.orig 2003-10-28 09:02:31.000000000 -0500
+++ Database.pm 2003-10-28 09:36:51.000000000 -0500
@@ -36,6 +36,7 @@
sub unlock {
my ($self, $page_id) = @_;
my $lock_handle = $self->lock_handle;
+ return unless -e $lock_handle;
flock($lock_handle, LOCK_UN)
or die "Can't unlock $page_idn:$!";
close $lock_handle;
--- Edit.pm.orig 2003-08-25 16:45:05.000000000 -0400
+++ Edit.pm 2003-10-28 09:53:40.000000000 -0500
@@ -144,12 +144,11 @@
}
sub delete {
+ # note: locking still exists outside this in the save() sub
my ($self) = @_;
my $page_id = $self->cgi->page_id;
- $self->database->lock($page_id);
$self->database->delete($self->cgi->page_id);
$self->cgi->page_id('');
- $self->database->unlock($page_id);
}
1;