aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Model
Commit message (Collapse)AuthorAgeLines
* Fix missing package requirement.Matthew Somerville2019-06-12-1/+0
|
* [Hounslow] Add general enquiries functionalityDave Arter2019-06-06-17/+2
| | | | | | | | | | | | This functionality allows a cobrand to replace the /contact form with a form that creates hidden reports which are sent via Open311. The form also allows file uploads in addition to photos. This functionality is currently enabled for the Hounslow cobrand and others cobrands can enable it by defining setup_general_enquiries_stash which primarily sets up the appropriate categories and default values for the report.
* If report hidden, also purge update photos cache.Matthew Somerville2019-05-07-1/+6
|
* Enforce maximum photo size on upload.Matthew Somerville2018-11-14-0/+1
| | | | (This might well have been done client-side by Dropzone.)
* Factor out ImageMagick wrapper.Matthew Somerville2018-11-14-53/+6
|
* Add option to symlink full size photos.Matthew Somerville2018-11-14-1/+19
|
* Factor out photo storage backend init checksDave Arter2018-09-28-4/+3
|
* Factor out photo storage into PhotoStorage::FileSystem backendDave Arter2018-09-28-45/+20
|
* Make current cobrand available on DB::SchemaDave Arter2017-09-01-0/+1
|
* Add debug toolbar middleware.Matthew Somerville2017-08-29-0/+5
| | | | | | | | | | | | | | If debug is enabled, using the CATALYST_DEBUG/FIXMYSTREET_APP_DEBUG environment variables, add a debug toolbar to the output, including request/response details and a database query log. This uses Plack middleware, so works by switching our dev server to use Starman with plack directly, rather than via the script runner. We remove the GZip compression as this interferes, and take a local copy of the QueryLog::AdoptPlack trait as it needs a tweak to work. Make sure the CSP header is not output in debug mode, as that would prevent the toolbar JavaScript from running.
* Use a schema cache to remember body lookups.Matthew Somerville2017-08-23-1/+10
|
* Move FixMyStreet::DB to FixMyStreet::DB::Schema.Matthew Somerville2017-08-09-2/+2
| | | | Store a schema object on FixMyStreet::DB instead.
* Upgrade to using Email::Sender.Matthew Somerville2017-03-28-19/+0
| | | | | | | | | | Email::Send is long deprecated and uses submodules that no longer work correctly (e.g. Net::SMTP::TLS breaks with recent IO::Socket::SSL). We create an Email::Sender subclass to perform the same functionality and this also simplifies the email code with simpler envelope handling. Bundle Email::Sender::Transport::SMTP to include fix from https://github.com/rjbs/Email-Sender/issues/46
* Do upload_dir check on start up, not each report.Matthew Somerville2017-03-15-8/+1
| | | | | If we're chugging through a list of reports, this save on a lot of pointless statting of the upload directory which we know is there.
* Assume photo ID given in database exists on disk.Matthew Somerville2017-02-28-6/+1
| | | | | | | The list code was checking the photo ID given in the database existed on disk – this shouldn't ever not be the case, and if it was, all that would happen would be a broken image when the full photo code looks for it (this is only for e.g. lists of reports).
* Make UPLOAD_DIR/GEO_CACHE relative to project rootMatthew Somerville2016-08-10-1/+1
| | | | | If they are absolute already, do nothing. Switch a couple of uses to Path::Tiny as well.
* Test for Image::Magick installation better.Matthew Somerville2016-08-01-4/+10
| | | | (VERSION disappears in some recent version.)
* Remove specific files rather than glob.Matthew Somerville2016-05-18-4/+15
| | | | This should improve performance when there are a lot of cached photos.
* Fix removal of cached update photos.Matthew Somerville2016-05-18-2/+4
| | | | | It was possible that rotating an update photo did not remove its cached copy.
* Switch external jhead call to use IPC::Open3.Matthew Somerville2016-05-03-1/+8
|
* Don't warn on bad photo hashes.Matthew Somerville2016-04-22-2/+2
|
* If admin removes all images, set db field to null.Matthew Somerville2016-04-20-2/+4
|
* Add PNG image support.Matthew Somerville2016-04-08-32/+47
| | | | | | | Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
* Only load images from disk when needed.Matthew Somerville2016-02-23-36/+36
| | | | Fixes #1337.
* Factor multiple photo details into nicer function.Matthew Somerville2016-01-12-5/+0
| | | | | Remove get_photo_params, which only looked at the first photo, make explicit when we're doing that using `.first`.
* Remove most passing of Catalyst to PhotoSet.Matthew Somerville2016-01-12-3/+1
|
* Handle multiple photo rotation/removal in admin.Matthew Somerville2016-01-08-0/+22
|
* Remove risk of infinite loop in PhotoSet.Matthew Somerville2015-12-16-8/+12
| | | | | | Use a separate attribute for data direct from a database row when creating a PhotoSet, so that data will always contain one or more photo IDs.
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-2/+2
| | | | Command line scripts don't need a full blown app, just database.
* Move EmailSend out of Catalyst for use elsewhere.Matthew Somerville2015-12-02-53/+2
|
* Base 64 decode uploaded images if requiredSteven Day2015-10-06-1/+20
| | | | | | | | | | | The new Zurich app has to base64 encode some images into a multipart request so that it can (ab)use Phonegap's FileTransfer plugin to send more than one image in a single request to /report/new/mobile. Catalyst's Request::Upload module doesn't look at the Content-Transfer-Encoding header inside multipart requests to do this automatically, so we perform the decoding manually when we process the images in the PhotoSet model.
* Allow attachment of emails in email_sendHakim Cassimally2015-10-06-1/+19
| | | | Required by Zurich for mysociety/FixMyStreet-Commercial#675
* Add support for multiple photos per report.Hakim Cassimally2015-10-06-0/+269
| | | | | | | | For Zurich, see mysociety/FixMyStreet-Commercial#664. This commit includes a new PhotoSet class (NB: called Model:: though not really a model), should handle binary data (e.g. old style photos in database), fileids (40-char hash), and Catalyst::Upload objects.
* Use same handling for cron and non-cron email.Matthew Somerville2015-01-13-2/+2
| | | | | This means that e.g. SMTP authentication is used when set up by all emails, not just non-cron ones. Fixes #988.
* Add support for SMTP authentication and TLS.Matthew Somerville2014-07-14-1/+20
| | | | | | Fixes #406. Include Perl modules necessary for Email::Send::SMTP to handle TLS/SSL, and upgrade Dir::Self due to https://rt.cpan.org/Public/Bug/Display.html?id=88393
* Wrapper around Email::Send::SMTP to set sender.Matthew Somerville2012-05-28-1/+1
|
* Fix incorrect mailer_argsEdmund von der Burg2011-04-05-1/+1
|
* Simple email sendingEdmund von der Burg2011-03-02-0/+51
|
* Added FixMyStreet::DB as a model to FixMyStreet::AppEdmund von der Burg2011-03-01-0/+24