]> git.decadent.org.uk Git - memories.git/blobdiff - Memories.pm
Arrayize tags with only one photo
[memories.git] / Memories.pm
index 0aebf11fab5cf447bbdadd0b047c800ffbf725b3..87a5ac0036228192f37066404862618339eb095f 100644 (file)
@@ -1,7 +1,7 @@
 package Memories;
 use strict;
 our $VERSION = "1.2";
-use Maypole::Application qw(Upload Authentication::UserSessionCookie -Debug);
+use Maypole::Application qw(Authentication::UserSessionCookie);
 use HTML::TagCloud;
 use URI;
 use Memories::Config;
@@ -91,6 +91,12 @@ sub authenticate {
    my ($self, $r) = @_;
    return DECLINED if $self->path =~/static|store/; # XXX
    $r->get_user;
+   if (!$r->user and $self->path =~ /upload/) { $r->template("login"); }
+   # Don't let 'em go until they've fixed it
+   if ($r->session and $r->session->{quarantined} and $self->path !~ /js$/) { 
+       $r->table("photo"); $r->action("quarantine");
+       $r->model_class("Memories::Photo");
+   }
    return OK; 
 }