diff options
author | christopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-15 06:57:22 +0000 |
---|---|---|
committer | christopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-15 06:57:22 +0000 |
commit | 3ab810cf3fccb98c580c281a12e0dd7c66e3d160 (patch) | |
tree | 1c44ae5261079572649da6b0ebf988afa5f56081 | |
parent | 8acbe667eeadb20674b8a4a19069a6ab5e73feac (diff) |
session_create will simply exit if executed via the command line
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@621 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/Session/DB.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/LedgerSMB/Session/DB.pm b/LedgerSMB/Session/DB.pm index af8b5ac4..8b1d20f0 100755 --- a/LedgerSMB/Session/DB.pm +++ b/LedgerSMB/Session/DB.pm @@ -89,6 +89,11 @@ sub session_check { sub session_create { my ($form) = @_; + if (! $ENV{HTTP_HOST}){ + #don't create cookies or sessions for CLI use + return 1; + } + # use the central database handle my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH}; |