aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/alert_types_eha.sql14
-rw-r--r--perllib/Cobrand.pm10
2 files changed, 13 insertions, 11 deletions
diff --git a/db/alert_types_eha.sql b/db/alert_types_eha.sql
index 1dd19200b..4ccd51cef 100644
--- a/db/alert_types_eha.sql
+++ b/db/alert_types_eha.sql
@@ -7,7 +7,7 @@ insert into alert_type
values ('new_updates', 'select * from problem where id=?', 'problem',
'Updates on {{title}}', '/', 'Updates on {{title}}',
'comment', 'comment.state=\'confirmed\'', 'created desc',
- 'Update by {{name}}', '/report/{{problem_id}}#comment_{{id}}', '{{text}}', 'eha/alert-update');
+ 'Update by {{name}}', '/report/{{problem_id}}#comment_{{id}}', '{{text}}', 'alert-update');
-- New problems anywhere on the site
insert into alert_type
@@ -18,7 +18,7 @@ insert into alert_type
values ('new_problems', '', '',
'New reports on reportemptyhomes.com', '/', 'The latest empty properties reported by users',
'problem', 'problem.state in (\'confirmed\', \'fixed\')', 'created desc',
- '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'eha/alert-problem');
+ '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem');
-- New fixed problems anywhere on the site
insert into alert_type
@@ -29,7 +29,7 @@ insert into alert_type
values ('new_fixed_problems', '', '',
'Properties recently reported as put back to use on reportemptyhomes.com', '/', 'The latest properties reported back to use by users',
'problem', 'problem.state in (\'fixed\')', 'lastupdate desc',
- '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'eha/alert-problem');
+ '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem');
-- New problems around a location
insert into alert_type
@@ -40,7 +40,7 @@ insert into alert_type
values ('local_problems', '', '',
'New local reports on reportemptyhomes.com', '/', 'The latest local reports reported by users',
'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (\'confirmed\', \'fixed\')', 'created desc',
- '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'eha/alert-problem-nearby');
+ '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby');
-- New problems sent to a particular council
insert into alert_type
@@ -52,7 +52,7 @@ values ('council_problems', '', '',
'New reports to {{COUNCIL}} on reportemptyhomes.com', '/reports', 'The latest reports for {{COUNCIL}} reported by users',
'problem', 'problem.state in (\'confirmed\', \'fixed\') and (council like \'%\'||?||\'%\'
or council is null) and areas like \'%,\'||?||\',%\'', 'created desc',
- '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'eha/alert-problem-council'
+ '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-council'
);
-- New problems within a particular ward sent to a particular council
@@ -66,7 +66,7 @@ values ('ward_problems', '', '',
'The latest reports for {{COUNCIL}} within {{WARD}} ward reported by users',
'problem', 'problem.state in (\'confirmed\', \'fixed\') and (council like \'%\'||?||\'%\'
or council is null) and areas like \'%,\'||?||\',%\'', 'created desc',
- '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'eha/alert-problem-ward'
+ '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-ward'
);
-- New problems within a particular voting area (ward, constituency, whatever)
@@ -79,6 +79,6 @@ values ('area_problems', '', '',
'New reports within {{NAME}}\'s boundary on reportemptyhomes.com', '/reports',
'The latest reports within {{NAME}}\'s boundary reported by users', 'problem',
'problem.state in (\'confirmed\', \'fixed\') and areas like \'%,\'||?||\',%\'', 'created desc',
- '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'eha/alert-problem-area'
+ '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-area'
);
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index ec439f7b4..f9dea2210 100644
--- a/perllib/Cobrand.pm
+++ b/perllib/Cobrand.pm
@@ -7,7 +7,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: louise@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: Cobrand.pm,v 1.9 2009-09-02 11:35:18 matthew Exp $
+# $Id: Cobrand.pm,v 1.10 2009-09-09 10:18:01 louise Exp $
package Cobrand;
use strict;
@@ -85,9 +85,11 @@ Set the language and domain of the site based on the cobrand and host
=cut
sub set_lang_and_domain{
my ($cobrand, $lang) = @_;
- my $handle = cobrand_handle($cobrand);
- if ($handle){
- $handle->set_lang_and_domain($lang);
+ if ($cobrand){
+ my $handle = cobrand_handle($cobrand);
+ if ($handle){
+ $handle->set_lang_and_domain($lang);
+ }
}
}