From f674299b721d26ea97fc36e7e6818a84f3d311d3 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 22 Jan 2013 02:58:23 +0100 Subject: Better check for domain existence. --- lib/Fripost/Panel/Interface.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Fripost/Panel') diff --git a/lib/Fripost/Panel/Interface.pm b/lib/Fripost/Panel/Interface.pm index cc7545a..aee0df4 100644 --- a/lib/Fripost/Panel/Interface.pm +++ b/lib/Fripost/Panel/Interface.pm @@ -225,7 +225,7 @@ sub EditLocal : Runmode { # Search for *the* matching user, alias or list. my ($d,$l) = ($self->split_path)[1,2]; - $fp->domain->get ($d, -die => 404, -attrs => []); + $fp->domain->get ($d, -die => 404, -assert_exist => 1); my %local = $fp->local->get ($l.'@'.$d, -die => 404, -concat => "\x{0D}\x{0A}" ); die "Unknown type" unless grep { $local{type} eq $_ } @@ -488,7 +488,7 @@ sub AddLocal : Runmode { unless ($error) { my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG ); - $fp->domain->get ($d, -die => 404, -attrs => []); + $fp->domain->get ($d, -die => 404, -assert_exist => 1); $error = $fp->$t->add( \%entry, -concat => "(\n|\x{0D}\x{0A})", %rest); $fp->done; return $self->redirect('./') unless $error; -- cgit v1.2.3