X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f401d6617a11efcedda1c956b2ccea061a7540f..be02a80b7a19f3c33a8ea42c0750d94e0a91206f:/IkiWiki/Plugin/attachment.pm diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index ee105a170..647a671a5 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -92,7 +92,7 @@ sub formbuilder_setup (@) { # Add the toggle javascript; the attachments interface uses # it to toggle visibility. require IkiWiki::Plugin::toggle; - $form->tmpl_param("javascript" => IkiWiki::Plugin::toggle::include_javascript($params{page}, 1)); + $form->tmpl_param("javascript" => IkiWiki::Plugin::toggle::include_javascript($params{page})); # Start with the attachments interface toggled invisible, # but if it was used, keep it open. if ($form->submitted ne "Upload Attachment" && @@ -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); @@ -242,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}, };