aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Panel
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2013-01-22 02:58:23 +0100
committerGuilhem Moulin <guilhem.moulin@fripost.org>2013-01-22 02:58:23 +0100
commitf674299b721d26ea97fc36e7e6818a84f3d311d3 (patch)
tree75c23d231e57296357d27b1ec78686c06a895980 /lib/Fripost/Panel
parent9f75efbed94052726c64284bad49d37ce905172f (diff)
Better check for domain existence.
Diffstat (limited to 'lib/Fripost/Panel')
-rw-r--r--lib/Fripost/Panel/Interface.pm4
1 files changed, 2 insertions, 2 deletions
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;