[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [620] trunk/LedgerSMB/Session/DB.pm



Revision: 620
          http://svn.sourceforge.net/ledger-smb/?rev=620&view=rev
Author:   christopherm
Date:     2006-11-14 22:55:11 -0800 (Tue, 14 Nov 2006)

Log Message:
-----------
session_create will simply exit if executed via the command line

Modified Paths:
--------------
    trunk/LedgerSMB/Session/DB.pm

Modified: trunk/LedgerSMB/Session/DB.pm
===================================================================
--- trunk/LedgerSMB/Session/DB.pm	2006-11-15 06:48:15 UTC (rev 619)
+++ trunk/LedgerSMB/Session/DB.pm	2006-11-15 06:55:11 UTC (rev 620)
@@ -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.