X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4292802ee5f93f7ec7644c5d0a30f7ffeb95e566..1334695f4ca8a08ea94c176f5cc4c1fafa7aa31c:/IkiWiki/Plugin/attachment.pm diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 216e00b3d..bd93d3718 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -146,7 +146,7 @@ sub formbuilder (@) { # Check that the user is allowed to edit a page with the # name of the attachment. - IkiWiki::check_canedit($filename, $q, $session, 1); + IkiWiki::check_canedit($filename, $q, $session); # And that the attachment itself is acceptable. check_canattach($session, $filename, $tempfile); @@ -183,10 +183,12 @@ sub formbuilder (@) { if ($config{rcs}) { IkiWiki::rcs_add($filename); IkiWiki::disable_commit_hook(); - IkiWiki::rcs_commit($filename, gettext("attachment upload"), - IkiWiki::rcs_prepedit($filename), - $session->param("name"), - $session->remote_addr()); + IkiWiki::rcs_commit( + file => $filename, + message => gettext("attachment upload"), + token => IkiWiki::rcs_prepedit($filename), + session => $session, + ); IkiWiki::enable_commit_hook(); IkiWiki::rcs_update(); } @@ -240,7 +242,7 @@ sub attachment_list ($) { push @ret, { "field-select" => '', link => htmllink($page, $page, $f, noimageinline => 1), - size => IkiWiki::Plugin::filecheck::humansize((stat(_))[7]), + size => IkiWiki::Plugin::filecheck::humansize((stat($f))[7]), mtime => displaytime($IkiWiki::pagemtime{$f}), mtime_raw => $IkiWiki::pagemtime{$f}, };