| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
app/controllers/public_body_controller.rb
config/general.yml-example
lib/configuration.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As the code stood, the list method in PublicBodyController would only
return results that had translations of the public body in the default
locale. This has a variety of problems if you're viewing pages in the
non-default locale - for example, the "first letter" links wouldn't
bring up the public bodies that began with that letter in the current
locale, only those that began with it in the default locale.
Ideally, every public body would be translated into every available
locale for the site, but there are cases where deployers wish to have
public body listings also include those from the default locale, in
case there are untralsated public bodies:
https://groups.google.com/d/msg/alaveteli-dev/zUY_USaAMAM/M7KTQ9RC5YUJ
This commit makes the default behaviour to look for public body
listings only in the current locale, but if the new configuration
option PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE is set, then public
body listings will be looked for in both the current locale and the
default locale.
Fixes #1000
|
| | |
|
| | |
|
| | |
|
|\ \ |
|
| | | |
|
|\| | |
|
| |/ |
|
|\ \
| | |
| | |
| | | |
rails-3-develop
|
| |/
| |
| |
| |
| |
| | |
The tests still pass with this code removed, so remove it - if
it's still needed, it should be readded with tests that would
fail without.
|
|\ \
| |/
|/| |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On PublicBody, we don't need to update info_requests_count
because that's already done with :counter_cache. On the
other hand, info_requests_successful_count and
info_requests_not_held_count can't be updated easily with
counter_cache (since they need conditions to be attached).
Instead we update them in post_save and post_destroy,
as suggested here:
http://blog.douglasfshearer.com/post/17495285851/custom-counter-cache-with-conditions
This also adds tests to ensure that the
after_(save|destroy) callbacks are called and that they
modify the counts correctly.
|
| |
| |
| |
| | |
This adds the MINIMUM_REQUESTS_FOR_STATISTICS config option.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The statistics on the status of the requests to a particular
public body are too slow to calculate on-the-fly, so this
commit adds:
* Extra columns on public_bodies to store counts of
the successful, not held, and overdue request counts
for each public body.
* A rake task which should be run periodically to update
the overdue request count column.
If Javascript is not available, the summary statistics are
shown as tables. If Javascript is available, graphs are
drawn with Flot.
|
|/ |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
points out, the case where the initial character is a space is somewhat confusing), just grab the first character of the whole string and check it against expected values.
|
| | |
|
| | |
|
|/
|
|
| |
we expect it to be.
|
|\ |
|
| |
| |
| |
| | |
outside initialization e.g. in tests.
|
| | |
|
| |
| |
| |
| | |
118n.locale in the handling of locales with underscores. Fixes #999.
|
| | |
|
|\ \
| |/
|/|
| |
| |
| | |
Conflicts:
locale/he_IL/app.po
locale/nb_NO/app.po
|
| |
| |
| |
| | |
errors when parsing large mails with envelopes on memory limited systems.
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
Conflicts:
spec/mailers/outgoing_mailer_spec.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This use of eval allows arbitrary remote code execution on
parsing of a maliciously formed email.
Two tests are updated to match the behaviour of the new
code to return the display name - these introduce extra
escaping, so should be innocous.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
You can see the number of emails that would be reparsed
by doing:
bundle exec rake temp:reextract_missing_attachments
To actually reparse the incoming emails and rextract
attachments for any that were missing, you would do:
bundle exec rake temp:reextract_missing_attachments[commit]
(In fact, the 'commit' can be any non-empty string.)
|
|\|
| |
| |
| |
| | |
Conflicts:
spec/models/info_request_spec.rb
|
| | |
|
| | |
|
| |
| |
| |
| | |
the email address.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | | |
rails-3-develop
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This seems to be the bug mentioned here:
http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/
That explains that some versions of Iconv don't ignore
invalid characters when converting to UTF-8 even with
//IGNORE if that invalid character happens to be at the end
of the string. In fact, as Matthew Somerville pointed out,
with some versions of iconv (e.g. 1.14 on Mac OS, apparently)
it's necessary to add and remove more than one space at the end,
in case the first character of the byte sequence indicates a
long sequence. We add and remove 4 to be on the safe side.
|
|\ \ \
| |/ /
|/| |
| | | |
'openaustralia_github/inline_search_method_refactor' into rails-3-develop
|