Not used
diff --git a/www/moderation/desk/models/message.rb b/www/moderation/desk/models/message.rb
index cb73e18..a42caf5 100644
--- a/www/moderation/desk/models/message.rb
+++ b/www/moderation/desk/models/message.rb
@@ -122,36 +122,6 @@
end
#
- # attachment operations: update, replace, delete
- #
-
- def update_attachment name, values
- attachment = find(name)
- if attachment
- attachment.headers.merge! values
- write_headers
- end
- end
-
- def replace_attachment name, values
- attachment = find(name)
- if attachment
- index = @headers[:attachments].find_index(attachment.headers)
- @headers[:attachments][index, 1] = Array(values)
- write_headers
- end
- end
-
- def delete_attachment name
- attachment = find(name)
- if attachment
- @headers[:attachments].delete attachment.headers
- @headers[:status] = :deleted if @headers[:attachments].empty?
- write_headers
- end
- end
-
- #
# write updated headers to disk
#
def write_headers
@@ -166,41 +136,6 @@
end
#
- # write one or more attachments to directory containing an svn checkout
- #
- def write_svn(repos, filename, *attachments)
- # drop all nil and empty values
- attachments = attachments.flatten.reject {|name| name.to_s.empty?}
-
- # if last argument is a Hash, treat it as name/value pairs
- attachments += attachments.pop.to_a if Hash === attachments.last
-
- if attachments.flatten.length == 1
- ext = File.extname(attachments.first).downcase.untaint
- find(attachments.first).write_svn(repos, filename + ext)
- else
- # validate filename
- unless filename =~ /\A[a-zA-Z][-.\w]+\z/
- raise IOError.new("invalid filename: #{filename}")
- end
-
- # create directory, if necessary
- dest = File.join(repos, filename).untaint
- unless File.exist? dest
- Dir.mkdir dest
- Kernel.system 'svn', 'add', dest
- end
-
- # write out selected attachment
- attachments.each do |attachment, basename|
- find(attachment).write_svn(repos, filename, basename)
- end
-
- dest
- end
- end
-
- #
# Construct a reply message, and in the process merge the email
# address from the original message (from, to, cc) with any additional
# address provided on the call (to, cc, bcc). Remove any duplicates