[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1321] trunk/LedgerSMB.pm
- Subject: SF.net SVN: ledger-smb: [1321] trunk/LedgerSMB.pm
- From: ..hidden..
- Date: Mon, 25 Jun 2007 17:01:11 -0700
Revision: 1321
http://svn.sourceforge.net/ledger-smb/?rev=1321&view=rev
Author: einhverfr
Date: 2007-06-25 17:01:10 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
If no login sent, return simple credential-free object
Modified Paths:
--------------
trunk/LedgerSMB.pm
Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm 2007-06-25 20:56:52 UTC (rev 1320)
+++ trunk/LedgerSMB.pm 2007-06-26 00:01:10 UTC (rev 1321)
@@ -160,6 +160,10 @@
if ( ( $self->{script} =~ m#(..|\\|/)# ) ) {
$self->error("Access Denied");
}
+ if (!$self->{login}){
+ #this is an ugly hack we need to rethink.
+ return $self;
+ }
$self->{_user} = LedgerSMB::User->fetch_config($self->{login});
my $locale = LedgerSMB::Locale->get_handle($self->{_user}->{countrycode})
@@ -610,9 +614,9 @@
delete $self->{pre};
- if ( !$self->{header} ) {
- $self->header;
- }
+
+ print qq|Content-Type: text/html; charset=utf-8\n\n|;
+ print "<head></head>";
print
qq|<body><h2 class="error">Error!</h2> <p><b>$self->{msg}</b></body>|;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.