From c64b1bd4c2f92ff2a2fe12423cf543e5ad4b72c8 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 19 Feb 2007 13:03:31 +0000 Subject: [PATCH] Fix some interesting breakages: you can't use ->session if there's no user. git-svn-id: http://svn.simon-cozens.org/memories/trunk@37 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- Memories.pm | 3 +-- Memories/Photo.pm | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Memories.pm b/Memories.pm index a789fab..236060d 100644 --- a/Memories.pm +++ b/Memories.pm @@ -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"); } diff --git a/Memories/Photo.pm b/Memories/Photo.pm index b48c69a..6d861cc 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -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); -- 2.39.5