X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c487b847e2053b13c4eea0ccfeecf5a41c396412..4691a2ad39cce273231fddd9a589b4f8fdc1b063:/IkiWiki/Plugin/lockedit.pm diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm index 5a4e2fc38..5ffb4e6f9 100644 --- a/IkiWiki/Plugin/lockedit.pm +++ b/IkiWiki/Plugin/lockedit.pm @@ -22,7 +22,7 @@ sub canedit ($$) { #{{{ foreach my $admin (@{$config{adminuser}}) { if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"))) { if (! defined $user || - ! userinfo_get($session->param("name"), "regdate")) { + ! IkiWiki::userinfo_get($session->param("name"), "regdate")) { return sub { IkiWiki::needsignin($cgi, $session) }; } else { @@ -40,11 +40,11 @@ sub formbuilder_setup (@) { #{{{ my %params=@_; my $form=$params{form}; - my $session=$params{session}; - my $cgi=$params{cgi}; - my $user_name=$session->param("name"); - if ($form->title eq "preferences") { + my $session=$params{session}; + my $cgi=$params{cgi}; + my $user_name=$session->param("name"); + $form->field(name => "locked_pages", size => 50, fieldset => "admin", comment => "(".htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1).")");