aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-08-01 12:03:45 +0100
committerDave Arter <davea@mysociety.org>2016-08-01 12:03:45 +0100
commit1af9684e54aedb7f9935cdc4d38a28c61ec7d1f5 (patch)
treed6b044f54e070f8dbf265083534e849eb9ad6ead /perllib/FixMyStreet/DB/Result/Comment.pm
parent14aaf6fafaa9aa8736f49851e95fa2c3c566c056 (diff)
parent27e0c74321f48f9997745bf00647e3958f34d8e2 (diff)
Merge branch '1281-html-emails'
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm23
1 files changed, 2 insertions, 21 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 85cdb29f0..25798edca 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -99,7 +99,8 @@ __PACKAGE__->rabx_column('extra');
use Moo;
use namespace::clean -except => [ 'meta' ];
-with 'FixMyStreet::Roles::Abuser';
+with 'FixMyStreet::Roles::Abuser',
+ 'FixMyStreet::Roles::PhotoSet';
my $stz = sub {
my ( $orig, $self ) = ( shift, shift );
@@ -147,26 +148,6 @@ sub confirm {
$self->confirmed( \'current_timestamp' );
}
-=head2 get_photoset
-
-Return a PhotoSet object for all photos attached to this field
-
- my $photoset = $obj->get_photoset;
- print $photoset->num_images;
- return $photoset->get_image_data(num => 0, size => 'full');
-
-=cut
-
-sub get_photoset {
- my ($self) = @_;
- my $class = 'FixMyStreet::App::Model::PhotoSet';
- eval "use $class";
- return $class->new({
- db_data => $self->photo,
- object => $self,
- });
-}
-
sub photos {
my $self = shift;
my $photoset = $self->get_photoset;