[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [621] branches/1.2/LedgerSMB/Session/DB.pm
- Subject: SF.net SVN: ledger-smb: [621] branches/1.2/LedgerSMB/Session/DB.pm
- From: ..hidden..
- Date: Tue, 14 Nov 2006 22:57:22 -0800
Revision: 621
http://svn.sourceforge.net/ledger-smb/?rev=621&view=rev
Author: christopherm
Date: 2006-11-14 22:57:22 -0800 (Tue, 14 Nov 2006)
Log Message:
-----------
session_create will simply exit if executed via the command line
Modified Paths:
--------------
branches/1.2/LedgerSMB/Session/DB.pm
Modified: branches/1.2/LedgerSMB/Session/DB.pm
===================================================================
--- branches/1.2/LedgerSMB/Session/DB.pm 2006-11-15 06:55:11 UTC (rev 620)
+++ branches/1.2/LedgerSMB/Session/DB.pm 2006-11-15 06:57:22 UTC (rev 621)
@@ -89,6 +89,11 @@
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};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.