]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/attachment.pm
fix inverted test
[ikiwiki.git] / IkiWiki / Plugin / attachment.pm
index 404ca07fa4fca244c9a34d6d7af50750e62337de..66b79cd824bc847ac0af1a84b546e7ebd746bf5f 100644 (file)
@@ -18,13 +18,6 @@ sub getsetup () { #{{{
                        safe => 1,
                        rebuild => 0,
                },
-               virus_checker => {
-                       type => "string",
-                       example => "clamdscan -",
-                       description => "virus checker program (reads STDIN, returns nonzero if virus found)",
-                       safe => 0, # executed
-                       rebuild => 0,
-               },
                allowed_attachments => {
                        type => "pagespec",
                        example => "virusfree() and mimetype(image/*) and maxsize(50kb)",
@@ -33,6 +26,13 @@ sub getsetup () { #{{{
                        safe => 1,
                        rebuild => 0,
                },
+               virus_checker => {
+                       type => "string",
+                       example => "clamdscan -",
+                       description => "virus checker program (reads STDIN, returns nonzero if virus found)",
+                       safe => 0, # executed
+                       rebuild => 0,
+               },
 } #}}}
 
 sub check_canattach ($$;$) { #{{{
@@ -143,7 +143,7 @@ sub formbuilder_setup (@) { #{{{
                                IkiWiki::userinfo_set($user_name, "allowed_attachments",
                                $form->field("allowed_attachments")) ||
                                        error("failed to set allowed_attachments");
-                               if (length $form->field("allowed_attachments")) {
+                               if (length $form->field("allowed_attachments")) {
                                        $form->field(name => "allowed_attachments", type => "hidden");
                                }
                        }