]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/attachment.pm
remove link to index
[ikiwiki.git] / IkiWiki / Plugin / attachment.pm
index ee105a1709f3fe71e0e44a47782e9596791dbbf9..647a671a518b9b9c4cdafbffc7675da661c8a0b6 100644 (file)
@@ -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" => '<input type="checkbox" name="attachment_select" value="'.$f.'" />',
                                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},
                        };