Skip to content

Commit

Permalink
Merge branch '1383-remove-dead-projects'
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Apr 22, 2016
2 parents c9d7be8 + 66eb844 commit c923ee7
Show file tree
Hide file tree
Showing 245 changed files with 319 additions and 8,843 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ before_install:
install:
- .travis/install
before_script:
- ./bin/make_po FixMyStreet-EmptyHomes
- ./bin/emptyhomes/make_welsh_po
- commonlib/bin/gettext-makemo FixMyStreet
script: "bin/run-tests t"
after_success:
Expand Down
80 changes: 0 additions & 80 deletions bin/emptyhomes/canonicalise-eha

This file was deleted.

116 changes: 0 additions & 116 deletions bin/emptyhomes/make_welsh_po

This file was deleted.

5 changes: 1 addition & 4 deletions bin/gettext-extract
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rm -f $PO

# we don't want to extract strings from all the cobrand templates so list
# the ones we care about
find templates/web/base templates/web/fixmystreet templates/web/zurich -name '*.html' > template_list
find templates/web/base templates/web/zurich -name '*.html' > template_list

# Extract from Perl
xgettext.pl --gnu-gettext --verbose --output $PO --plugin perl=* --plugin tt2 --directory perllib -f template_list --directory db --directory bin
Expand All @@ -34,6 +34,3 @@ bin/update_po_header.bash $PO

echo "$( bin/gettext-nget-patch )" >> $PO

#bin/make_po FixMyStreet-EmptyHomes
#bin/make_po FixMyBarangay

5 changes: 0 additions & 5 deletions bin/gettext-merge
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ do
then
cd $X/LC_MESSAGES
echo $X
if [ -e EmptyHomes.po ]
then
msgmerge --no-wrap -o New.po EmptyHomes.po ../../FixMyStreet-EmptyHomes.po
mv New.po EmptyHomes.po
fi
if [ -e FixMyStreet.po ]
then
msgmerge --no-wrap -o New.po FixMyStreet.po ../../FixMyStreet.po
Expand Down
2 changes: 0 additions & 2 deletions bin/install-as-user
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ echo $DONE_MSG

# Generate po and mo files (these invocations taken from Kagee's script):
echo "Creating locale .mo files"
bin/make_po FixMyStreet-EmptyHomes
bin/emptyhomes/make_welsh_po
commonlib/bin/gettext-makemo FixMyStreet
echo $DONE_MSG

Expand Down
1 change: 0 additions & 1 deletion bin/problem-creation-graph
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ my %config = (
my $base_url = FixMyStreet->config('BASE_URL');
$config{date} = '2007-02-01';
$config{date} = '2011-03-03' if $base_url =~ /fiksgatami/;
$config{date} = '2008-10-01' if $base_url =~ /emptyhomes/;

my %sources;
sub grab_data {
Expand Down
8 changes: 0 additions & 8 deletions bin/update-all-reports
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ while ( my @problem = $problems->next ) {
}
}

if ( FixMyStreet->config('BASE_URL') =~ /emptyhomes/ ) {
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('emptyhomes')->new();
my $stats = $cobrand->old_site_stats;
foreach (keys %$stats) {
$open{$_}{unknown} += $stats->{$_};
}
}

my $body = encode_json( {
fixed => \%fixed,
open => \%open,
Expand Down
10 changes: 2 additions & 8 deletions perllib/CronFns.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,14 @@ sub options {
sub site {
my $base_url = shift;
my $site = 'fixmystreet';
$site = 'emptyhomes' if $base_url =~ 'emptyhomes';
$site = 'zurich' if $base_url =~ /zurich|zueri/;
return $site;
}

sub language {
my $site = shift;
if ($site eq 'emptyhomes') {
mySociety::Locale::negotiate_language('en-gb,English,en_GB|cy,Cymraeg,cy_GB');
mySociety::Locale::gettext_domain('FixMyStreet-EmptyHomes', 1);
} else {
mySociety::Locale::negotiate_language('en-gb,English,en_GB|nb,Norwegian,nb_NO'); # XXX Testing
mySociety::Locale::gettext_domain('FixMyStreet', 1);
}
mySociety::Locale::negotiate_language('en-gb,English,en_GB|nb,Norwegian,nb_NO'); # XXX Testing
mySociety::Locale::gettext_domain('FixMyStreet', 1);
}

1;
12 changes: 0 additions & 12 deletions perllib/FixMyStreet/App/Controller/Admin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ sub update_contacts : Private {
$errors{email} = _('Please enter a valid email') unless is_valid_email($email) || $email eq 'REFUSED';
$errors{note} = _('Please enter a message') unless $c->get_param('note');

$category = 'Empty property' if $c->cobrand->moniker eq 'emptyhomes';

my $contact = $c->model('DB::Contact')->find_or_new(
{
body_id => $c->stash->{body_id},
Expand Down Expand Up @@ -743,16 +741,6 @@ sub report_edit : Path('report_edit') : Args(1) {

my $new_state = $c->get_param('state');
my $old_state = $problem->state;
if ( $new_state eq 'confirmed'
&& $problem->state eq 'unconfirmed'
&& $c->cobrand->moniker eq 'emptyhomes' )
{
$c->stash->{status_message} =
'<p><em>'
. _('I am afraid you cannot confirm unconfirmed reports.')
. '</em></p>';
$done = 1;
}

my $flagged = $c->get_param('flagged') ? 1 : 0;
my $non_public = $c->get_param('non_public') ? 1 : 0;
Expand Down
4 changes: 2 additions & 2 deletions perllib/FixMyStreet/App/Controller/Around.pm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sub index : Path : Args(0) {
}

# Check to see if the spot is covered by a area - if not show an error.
return unless $c->cobrand->moniker eq 'fixmybarangay' || $c->forward('check_location_is_acceptable');
return unless $c->forward('check_location_is_acceptable');

# If we have a partial - redirect to /report/new so that it can be
# completed.
Expand Down Expand Up @@ -182,7 +182,7 @@ sub display_location : Private {

# create a list of all the pins
my @pins;
unless ($c->get_param('no_pins') || $c->cobrand->moniker eq 'emptyhomes') {
unless ($c->get_param('no_pins')) {
@pins = map {
# Here we might have a DB::Problem or a DB::Nearby, we always want the problem.
my $p = (ref $_ eq 'FixMyStreet::App::Model::DB::Nearby') ? $_->problem : $_;
Expand Down
13 changes: 0 additions & 13 deletions perllib/FixMyStreet/App/Controller/Questionnaire.pm
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ sub check_questionnaire : Private {

$c->stash->{problem} = $problem;
$c->stash->{answered_ever_reported} = $problem->user->answered_ever_reported;

# EHA needs to know how many to alter display, and whether to send another or not
if ($c->cobrand->moniker eq 'emptyhomes') {
$c->stash->{num_questionnaire} = $c->model('DB::Questionnaire')->count(
{ problem_id => $problem->id }
);
}

}

=head2 submit
Expand Down Expand Up @@ -236,11 +228,6 @@ sub process_questionnaire : Private {

$c->stash->{update} = Utils::cleanup_text($c->stash->{update}, { allow_multiline => 1 });

# EHA questionnaires done for you
if ($c->cobrand->moniker eq 'emptyhomes') {
$c->stash->{another} = $c->stash->{num_questionnaire}==1 ? 'Yes' : 'No';
}

my @errors;
push @errors, _('Please state whether or not the problem has been fixed')
unless $c->stash->{been_fixed};
Expand Down
2 changes: 1 addition & 1 deletion perllib/FixMyStreet/App/Controller/Report.pm
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ to moderation, however we'd need to inform all the other
users too about this change, at which point we can delete:
- this method
- the call to it in templates/web/fixmystreet/report/display.html
- the call to it in templates/web/base/report/display_tools.html
- the users_can_hide cobrand method, in favour of user->has_permission_to
=cut
Expand Down
Loading

0 comments on commit c923ee7

Please sign in to comment.