diff options
author | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
commit | 987124b09a32248414faf4d0d6615d43b29ac6f6 (patch) | |
tree | a549db8af723c981d3b346e855f25d6fd5ff8aa7 /perllib/FixMyStreet/App/Model | |
parent | dbf56159e44c1560a413022451bf1a1c4cb22a52 (diff) | |
parent | a085b63ce09f87e83b75cda9b9cd08aadfe75d61 (diff) |
Merge tag 'v2.0.4' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/App/Model')
-rw-r--r-- | perllib/FixMyStreet/App/Model/EmailSend.pm | 19 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Model/PhotoSet.pm | 16 |
2 files changed, 2 insertions, 33 deletions
diff --git a/perllib/FixMyStreet/App/Model/EmailSend.pm b/perllib/FixMyStreet/App/Model/EmailSend.pm deleted file mode 100644 index 93751d4a6..000000000 --- a/perllib/FixMyStreet/App/Model/EmailSend.pm +++ /dev/null @@ -1,19 +0,0 @@ -package FixMyStreet::App::Model::EmailSend; -use base 'Catalyst::Model::Factory'; - -use strict; -use warnings; - -=head1 NAME - -FixMyStreet::App::Model::EmailSend - -=head1 DESCRIPTION - -Catalyst Model wrapper around FixMyStreet::EmailSend - -=cut - -__PACKAGE__->config( - class => 'FixMyStreet::EmailSend', -); diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm index 46e1fb630..8fcc1700e 100644 --- a/perllib/FixMyStreet/App/Model/PhotoSet.pm +++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm @@ -67,14 +67,7 @@ has upload_dir => ( is => 'ro', lazy => 1, default => sub { - my $self = shift; - my $cache_dir = path(FixMyStreet->config('UPLOAD_DIR'))->absolute(FixMyStreet->path_to()); - $cache_dir->mkpath; - unless ( -d $cache_dir && -w $cache_dir ) { - warn "Can't find/write to photo cache directory '$cache_dir'"; - return; - } - $cache_dir; + path(FixMyStreet->config('UPLOAD_DIR'))->absolute(FixMyStreet->path_to()); }, ); @@ -191,12 +184,7 @@ has ids => ( # Arrayref of $fileid tuples (always, so post upload/raw data proc $type ||= 'jpeg'; if ($fileid && length($fileid) == 40) { my $file = $self->get_file($fileid, $type); - if ($file->exists) { - $file->basename; - } else { - warn "File $part doesn't exist"; - (); - } + $file->basename; } else { # A bad hash, probably a bot spamming with bad data. (); |