]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/attachment.pm
hide deprecated values if empty after save
[ikiwiki.git] / IkiWiki / Plugin / attachment.pm
index b6327f0c5455fdfe1a622e0e26f36663653357da..bd21ed1edd4549b2ba99ecbc85c620477b84b40c 100644 (file)
@@ -143,6 +143,9 @@ sub formbuilder_setup (@) { #{{{
                                IkiWiki::userinfo_set($user_name, "allowed_attachments",
                                $form->field("allowed_attachments")) ||
                                        error("failed to set allowed_attachments");
                                IkiWiki::userinfo_set($user_name, "allowed_attachments",
                                $form->field("allowed_attachments")) ||
                                        error("failed to set allowed_attachments");
+                               if (length $form->field("allowed_attachments")) {
+                                       $form->field(name => "allowed_attachments", type => "hidden");
+                               }
                        }
                }
        }
                        }
                }
        }