X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/69c22fa1ea143e3eb36692e087b167ae2171581e..2d411d7729f2afa61afd4fd406747a204b937175:/IkiWiki/Plugin/attachment.pm?ds=inline diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index ce688ca40..ee105a170 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -58,7 +58,7 @@ sub check_canattach ($$;$) { $config{allowed_attachments}, file => $file, user => $session->param("name"), - ip => $ENV{REMOTE_ADDR}, + ip => $session->remote_addr(), ); } @@ -183,9 +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"), $ENV{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(); }