]> git.decadent.org.uk Git - memories.git/commitdiff
Fix some interesting breakages: you can't use ->session if there's no user.
authorSimon Cozens <simon@simon-cozens.org>
Mon, 19 Feb 2007 13:03:31 +0000 (13:03 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Mon, 19 Feb 2007 13:03:31 +0000 (13:03 +0000)
git-svn-id: http://svn.simon-cozens.org/memories/trunk@37 041978f6-d955-411f-a9d7-1d8545c9c3c7

Memories.pm
Memories/Photo.pm

index a789fabf524497765120d66a42bf8ee85a5bb29a..236060ddc6267da5af1b88f5a6364aa2cf5f09d1 100644 (file)
@@ -93,8 +93,7 @@ sub authenticate {
    $r->get_user;
    if (!$r->user and $self->path =~ /upload/) { $r->template("login"); }
    # Don't let 'em go until they've fixed it
-   warn "Quarantine is : ".$r->session->{quarantined};
-   if ($r->session->{quarantined} and $self->path !~ /js$/) { 
+   if ($r->session and $r->session->{quarantined} and $self->path !~ /js$/) { 
        $r->table("photo"); $r->action("quarantine");
        $r->model_class("Memories::Photo");
    }
index b48c69abd4b195b5bb349557cb7ccf527ae26ed1..6d861cc7c2cee76ce99d6517b71f9ed292387840 100644 (file)
@@ -1,7 +1,6 @@
 package Memories::Photo;
 use File::Basename;
 use File::Copy;
-use Archive::Any;
 use strict;
 use Carp qw(cluck confess);
 use base qw(Memories::DBI Maypole::Model::CDBI::Plain);