summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-11-22 21:54:31 +0000
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-11 21:14:03 +0000
commit286dbb0541225dd4ff7db6ed958922f7512b789b (patch)
tree891edb145efe5d71e111556a9dbce988de6708dd /IkiWiki/Plugin
parent9a6005a212f9be2395943f424e48270b24588fcd (diff)
comments: use CGI module's checksessionexpiry
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/comments.pm14
1 files changed, 1 insertions, 13 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index f10400db1..136dc258e 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -120,18 +120,6 @@ sub linkuser ($) { # {{{
}
} # }}}
-# FIXME: taken from IkiWiki::Plugin::editpage, should be common?
-sub checksessionexpiry ($$) { # {{{
- my $session = shift;
- my $sid = shift;
-
- if (defined $session->param("name")) {
- if (! defined $sid || $sid ne $session->id) {
- error(gettext("Your login session has expired."));
- }
- }
-} # }}}
-
# Mostly cargo-culted from IkiWiki::plugin::editpage
sub sessioncgi ($$) { #{{{
my $cgi=shift;
@@ -300,7 +288,7 @@ sub sessioncgi ($$) { #{{{
# Let's get posting. We don't check_canedit here because
# that somewhat defeats the point of this plugin.
- checksessionexpiry($session, $cgi->param('sid'));
+ IkiWiki::checksessionexpiry($session, $cgi->param('sid'));
# FIXME: check that the wiki is locked right now, because
# if it's not, there are mad race conditions!