X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e81e857ba62970caefd0f674d2cdfc3f9b70fe09..f00ccd0bf65e2a8d3d0ff4a3960e32c7aeba835a:/IkiWiki/Plugin/editpage.pm?ds=inline diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index d15607990..78d0704c7 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -342,7 +342,7 @@ sub cgi_editpage ($$) { else { # save page check_canedit($page, $q, $session); - checksessionexpiry($q, $session, $q->param('sid')); + checksessionexpiry($q, $session); my $exists=-e "$config{srcdir}/$file"; @@ -400,10 +400,12 @@ sub cgi_editpage ($$) { eval { writefile($file, $config{srcdir}, $content) }; $config{cgi}=1; if ($@) { + # save $@ in case a called function clobbers it + my $error = $@; $form->field(name => "rcsinfo", value => rcs_prepedit($file), force => 1); my $mtemplate=template("editfailedsave.tmpl"); - $mtemplate->param(error_message => $@); + $mtemplate->param(error_message => $error); $form->tmpl_param("message", $mtemplate->output); $form->field("editcontent", value => $content, force => 1); $form->tmpl_param("page_select", 0);