summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-15 06:55:11 +0000
committerchristopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-15 06:55:11 +0000
commit454c1ff918114c4db94ed4740e32268f8d117b50 (patch)
tree0f535797f8b2195ac3f7b516b3de7a1c11575c15
parentd8c0e366058f7f69f5edd78c8279ed9b2f52d275 (diff)
session_create will simply exit if executed via the command line
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@620 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/Session/DB.pm5
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};