| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
|
|
| |
mb_chars provides a multibyte-aware wrapper for strings. It should
have no effect on ruby 1.9.3 and above. Although ruby 1.8.7 wouldn't
raise errors on a badly sliced multibyte string, on upgrading to ruby
1.9.3 and above, string operations such as gsub, match and join may
produce ArgumentErrors with the message "invalid byte sequence in UTF-8".
Additionally, a database with 'UTF-8' encoding may produce the error
"PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8""
|
|
|
|
|
|
|
|
|
|
| |
Seems more logical to make this one method that figures out what to do
based on file type. Plus, incoming message does so many things, it
seemed like having these related methods be separate would make them
easier to read and understand. Also, email, mobile and login
substitution texts weren't being translated. Finally, I think passing
the censor rules and masks as arguments is a first step in some more
decoupling of models.
|
| |
|
|\ |
|
| |
| |
| |
| | |
Picks these up in `rake notes` and adds semantic meaning
|
|/
|
|
| |
Fixes #1569
|
|\
| |
| |
| | |
'opennewzealand_github/feature/encode-utf8-messages' into rails-3-develop
|
| | |
|
| |
| |
| |
| | |
Also use duck typing for whether we should use encode
|
|/
|
|
|
|
|
| |
We already handled this type of quoting when coming directly from a text
part of a mail, but when we choose the HTML part as the main part and
then convert it to text, the 'On [date] <email> person said:' part can
get split over two lines.
|
|
|
|
|
|
| |
Under the Rails hood, using the setters for attributes now involves
calling the getters too, (for a will_change? check), so these calls
became circular - use write_attribute instead.
|
| |
|
|
|
|
| |
Add some tests that it's working on the outgoing message model.
|
|
|
|
|
|
| |
Conflicts:
app/views/request/_incoming_correspondence.html.erb
|
|
|
|
|
|
| |
At least some of the logic for incoming and outgoing message prominence
is going to be identical, so move it to a module they can both include
and use.
|
|
|
|
| |
We're about to reuse them for the text view.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Move it into the Ability module.
|
| |
|
|
|
|
|
| |
Add a convenience method for getting the 'response' event associated
with an incoming message.
|
| |
|
| |
|
|
|
|
| |
ruby 1.8 by using mb_chars for length comparison - it counts multibyte characters.
|
|
|
|
| |
body is only quoted text and there is no subject.
|
|
|
|
| |
the main part in order to look for uuencoded text, make sure that we're getting that main part from the reparsed attachments, and not getting an obsolete attachment. Fixes #958.
|
|
|
|
|
|
|
|
|
|
|
| |
If the display_filename of the attachment found from the
URL part number doesn't match the passed in display_filename
then the email may have been reparsed, causing a reordering.
In that case, look to see if there is another attachment that
uniquely matches that filename, and, if so, return that other
attachment. If no matching uniquely matching filename is
found, redirect to the incoming message, rather than
returning a 404.
|
| |
|
|
|
|
|
|
|
| |
Handling of outlook-packed attachments would fail from
rake tasks or in the console without requiring 'mapi/msg'
and 'mapi/convert' beforehand. Instead, require them in
the source file where they're actually used.
|
|
|
|
|
|
|
|
|
|
|
| |
Under Rails 3, the uudecoded FoiAttachment in this test
fails validation at the self.save! in
IncomingMessage.parse_raw_email, although the FoiAttachment
has been correctly created and saved to the database in
_uudecode_and_save_attachments. Forcing a reload=true on
self.foi_attachments fixes this.
Thanks to Louise Crow for finding the fix for this problem.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
implicitly loaded via Mail
|
|
|
|
|
|
|
|
| |
force_encoding is generally not a good idea and I can't see what it's trying to achieve here so...
Revert "Use the character set of the attachment to encode the string that we're pulling out of the file before converting it to our default encoding."
This reverts commit 3729f2053d4c04396d440a9c368bed174e9c9605.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Gemfile
Gemfile.lock
app/controllers/general_controller.rb
app/controllers/track_controller.rb
app/models/outgoing_message.rb
app/models/public_body.rb
app/models/user.rb
app/views/general/frontpage.rhtml
config/environment.rb
config/initializers/inflections.rb
config/initializers/mime_types.rb
db/migrate/094_remove_old_tags_foreign_key.rb
lib/timezone_fixes.rb
spec/models/request_mailer_spec.rb
spec/views/request/list.rhtml_spec.rb
|
| |
| |
| |
| | |
encoded data.
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Gemfile
Gemfile.lock
config/environment.rb
lib/i18n_fixes.rb
|
| |\ |
|
| | | |
|
| | | |
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Gemfile
Gemfile.lock
app/views/request/_hidden_correspondence.rhtml
app/views/request/hidden.rhtml
app/views/request/new_please_describe.rhtml
app/views/user/show.rhtml
lib/i18n_fixes.rb
|
| | | |
|
| |/
|/|
| |
| | |
Makes FoiAttachment model specs pass
|
| | |
|