if (pagespec_match($page, userinfo_get($admin, "locked_pages"))) {
return 1 if $nonfatal;
+ #translators: The first parameter is a page name,
+ #translators: second is the user who locked it.
error(sprintf(gettext("%s is locked by %s and cannot be edited"),
htmllink("", "", $page, 1),
userlink($admin)));
delete @{$change->{pages}}[10 .. @{$change->{pages}}] if $is_excess;
$change->{pages} = [
map {
- $_->{link} = htmllink("", "", $_->{page}, 1);
+ $_->{link} = htmllink("", "", $_->{page}, 1, 0, pagetitle($_->{page}));
$_;
} @{$change->{pages}}
];
params => $q,
action => $config{cgiurl},
header => 0,
- template => (-e "$config{templatedir}/signin.tmpl" ?
- {template_params("signin.tmpl")} : ""),
+ template => scalar template_params("signin.tmpl"),
stylesheet => baseurl()."style.css",
);
my $buttons=["Login"];
javascript => 0,
params => $q,
action => $config{cgiurl},
- template => (-e "$config{templatedir}/prefs.tmpl" ?
- {template_params("prefs.tmpl")} : ""),
+ template => scalar template_params("prefs.tmpl"),
stylesheet => baseurl()."style.css",
);
my $buttons=["Save Preferences", "Logout", "Cancel"];
params => $q,
action => $config{cgiurl},
table => 0,
- template => (-e "$config{templatedir}/editpage.tmpl" ?
- {template_params("editpage.tmpl")} : ""),
+ template => scalar template_params("editpage.tmpl"),
);
run_hooks(formbuilder_setup => sub {
print $form->render(submit => \@buttons);
return;
}
+ else {
+ # Make sure that the repo is up-to-date;
+ # locking prevents the post-commit hook
+ # from updating it.
+ rcs_update();
+ }
}
else {
require IkiWiki::Render;
$q->param('do', 'create');
cgi_editpage($q, $session);
}
+ elsif ($do eq 'postsignin') {
+ error(gettext("login failed, perhaps you need to turn on cookies?"));
+ }
else {
error("unknown do parameter");
}