X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Memories%2FPhoto.pm;h=57a53c46d93b9c68471195f0ac070e3206444fa3;hb=090e12c1f7141a6d5a25014fc33e9b1cc382c0b7;hp=5a9b91e56aa133ea4cda60c948a12a6d7e7a9bba;hpb=006c40622b5547fcbb693fb37e2216e1d0e7bb6e;p=memories.git diff --git a/Memories/Photo.pm b/Memories/Photo.pm index 5a9b91e..57a53c4 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -14,7 +14,9 @@ BEGIN { my %order_by = ( recent => "uploaded", popular => "hit_count", - interesting => INTERESTINGNESS_ALGORITHM + loved => "rating/(1+rated)", + interesting => INTERESTINGNESS_ALGORITHM, + random => "rand()" ); while (my($label, $how) = each %order_by) { @@ -43,7 +45,6 @@ sub do_upload :Exported { my ($self, $r) = @_; my %upload = $r->upload("photo"); - # XXX Stop anonymous uploads! my $photo = $self->create({ uploader => $r->user, uploaded => Time::Piece->new(),