]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/lockedit.pm
beautify url recentchanges_link redirs to
[ikiwiki.git] / IkiWiki / Plugin / lockedit.pm
index 5a4e2fc385822006c55ad0056475624b1ed99d0f..5ffb4e6f9edd254691f4fb5b246e3afb2aeea147 100644 (file)
@@ -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).")");