summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-21 00:40:54 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-21 00:40:54 +0000
commite863e18ecb605809654c996412c871d15db449bf (patch)
treeb4cbe4f30c937efb7518101de44b9b076ae506a7
parent34a683f893ce86ec49a222273e8c38cdc69f258f (diff)
Logout works as advertised and script bug is fixed.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@665 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/Form.pm2
-rwxr-xr-xbin/login.pl4
2 files changed, 3 insertions, 3 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index ae67080c..300d0e13 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -299,7 +299,7 @@ sub redirect {
my ($self, $msg) = @_;
use List::Util qw(first);
- if ($self->{callback}) {
+ if ($self->{callback} || !$msg) {
main::redirect();
} else {
diff --git a/bin/login.pl b/bin/login.pl
index 22f32290..40f0a10c 100755
--- a/bin/login.pl
+++ b/bin/login.pl
@@ -348,10 +348,10 @@ sub login {
sub logout {
- undef $form->{callback};
+ $form->{callback} = "";
$form->{endsession} = 1;
Session::session_destroy($form);
- $form->redirect;
+ $form->redirect;
}