aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb5
-rw-r--r--app/models/info_request.rb2
2 files changed, 5 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index ae7d1201e..b0b02fdda 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -569,7 +569,8 @@ class IncomingMessage < ActiveRecord::Base
text.gsub!(/(Complaints and Corporate Affairs Officer)\s+Westminster Primary Care Trust.+/ms, "\\1")
# Remove WhatDoTheyKnow signup links
- text.gsub!(/http:\/\/www.whatdotheyknow.com\/c\/[^\s]+/, "[WDTK login link]")
+ domain = MySociety::Config.get('DOMAIN')
+ text.gsub!(/http:\/\/#{domain}\/c\/[^\s]+/, "[WDTK login link]")
# Remove Home Office survey links
# e.g. http://www.whatdotheyknow.com/request/serious_crime_act_2007_section_7#incoming-12650
@@ -1134,7 +1135,7 @@ class IncomingMessage < ActiveRecord::Base
elsif content_type == 'text/html'
# lynx wordwraps links in its output, which then don't get formatted properly
# by Alaveteli. We use elinks instead, which doesn't do that.
- external_command("/usr/bin/elinks", "-dump-charset", "utf-8", "-force-html", "-dump",
+ external_command("/usr/bin/elinks", "-eval", "'set document.codepage.assume = \"utf-8\"'", "-dump-charset", "utf-8", "-force-html", "-dump",
tempfile.path, :append_to => text)
elsif content_type == 'application/vnd.ms-excel'
# Bit crazy using /usr/bin/strings - but xls2csv, xlhtml and
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 419546c99..c667e1499 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -651,6 +651,8 @@ public
# days is a very long time.
def date_very_overdue_after
last_sent = last_event_forming_initial_request
+ very_late_days_later = MySociety::Config.get('REPLY_VERY_LATE_AFTER_DAYS', 40)
+ school_very_late_days_later = MySociety::Config.get('SPECIAL_REPLY_VERY_LATE_AFTER_DAYS', 60)
if self.public_body.is_school?
# schools have 60 working days maximum (even over a long holiday)
return Holiday.due_date_from(self.date_initial_request_last_sent_at, 60)