From 3ab810cf3fccb98c580c281a12e0dd7c66e3d160 Mon Sep 17 00:00:00 2001 From: christopherm Date: Wed, 15 Nov 2006 06:57:22 +0000 Subject: 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 --- LedgerSMB/Session/DB.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'LedgerSMB') 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}; -- cgit v1.2.3