aboutsummaryrefslogtreecommitdiffstats
path: root/lib/FPanel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/FPanel')
-rw-r--r--lib/FPanel/Interface.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/FPanel/Interface.pm b/lib/FPanel/Interface.pm
index 8087cb9..053e1a2 100644
--- a/lib/FPanel/Interface.pm
+++ b/lib/FPanel/Interface.pm
@@ -149,9 +149,12 @@ sub EditDomain : Runmode {
my ($ul,$ud) = split /\@/, $self->authen->username, 2;
my $d = (split /\//, $ENV{PATH_INFO}, 3)[1];
- my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
my $q = $self->query;
+ return $self->redirect($q->url .'/') if defined $q->param('cancel');
+
+ my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
+
my $error; # Tells whether the change submission has failed.
if (defined $q->param('submit')) {
# Changes have been submitted: process them
@@ -200,9 +203,12 @@ sub EditLocal : Runmode {
my ($ul,$ud) = split /\@/, $self->authen->username, 2;
my ($null,$d,$l,$crap) = split /\//, $ENV{PATH_INFO}, 4;
- my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
my $q = $self->query;
+ return $self->redirect($q->url.'/'.$d.'/') if defined $q->param('cancel');
+
+ my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
+
my $error; # Tells whether the change submission has failed.
if (defined $q->param('submit')) {
# Changes have been submitted: process them
@@ -330,6 +336,8 @@ sub AddLocal : Runmode {
my $d = (split /\//, $ENV{PATH_INFO}, 3)[1];
my $q = $self->query;
+ return $self->redirect($q->url.'/'.$d.'/') if defined $q->param('cancel');
+
my $t = $q->param('t') // die "Undefined type";
my $error; # Tells whether the change submission has failed.
if (defined $q->param('submit')) {