[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2771] trunk
- Subject: SF.net SVN: ledger-smb:[2771] trunk
- From: ..hidden..
- Date: Fri, 23 Oct 2009 23:43:15 +0000
Revision: 2771
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2771&view=rev
Author: einhverfr
Date: 2009-10-23 23:43:15 +0000 (Fri, 23 Oct 2009)
Log Message:
-----------
Tentative fix for cookie problems
Modified Paths:
--------------
trunk/LedgerSMB/Auth/DB.pm
trunk/bin/aa.pl
trunk/bin/gl.pl
Modified: trunk/LedgerSMB/Auth/DB.pm
===================================================================
--- trunk/LedgerSMB/Auth/DB.pm 2009-10-14 16:01:08 UTC (rev 2770)
+++ trunk/LedgerSMB/Auth/DB.pm 2009-10-23 23:43:15 UTC (rev 2771)
@@ -243,6 +243,8 @@
sub session_destroy {
my ($form) = @_;
+ my $path = ($ENV{SCRIPT_NAME});
+ $path =~ s|[^/]*$||;
my $login = $form->{login};
$login =~ s/[^a-zA-Z0-9._+\@'-]//g;
@@ -260,7 +262,7 @@
__FILE__ . ':' . __LINE__ . ': Delete from session: ' );
#delete the cookie in the browser
- print qq|Set-Cookie: ${LedgerSMB::Sysconfig::cookie_name}=; path=/;\n|;
+ print qq|Set-Cookie: ${LedgerSMB::Sysconfig::cookie_name}=; path=$path;\n|;
}
Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl 2009-10-14 16:01:08 UTC (rev 2770)
+++ trunk/bin/aa.pl 2009-10-23 23:43:15 UTC (rev 2771)
@@ -959,6 +959,8 @@
'save_info' =>
{ ndx => 9, key => 'I', value => $locale->text('Save Info') },
+ 'save_temp' =>
+ { ndx => 10, key => 'T', value => $locale->text('Save Template')},
);
if (!$form->{approved} && !$form->{batch_id}){
$button{approve} = {
@@ -1028,6 +1030,21 @@
|;
}
+sub save_temp {
+ use LedgerSMB;
+ use LedgerSMB::DBObject::TransTemplate;
+ my $lsmb = LedgerSMB->new();
+ $lsmb->{is_invoice} = 1;
+ if ($form->{arap} eq 'ar'){
+ $lsmb->{entity_class} = 2;
+ } else {
+ $lsmb->{entity_class} = 1;
+ }
+ $template = LedgerSMB::DBObject::TransTemplate->new(base => $lsmb);
+ $template->save;
+ $form->redirect( $locale->text('Template Saved!') );
+}
+
sub edit_and_approve {
use LedgerSMB::DBObject::Draft;
use LedgerSMB;
Modified: trunk/bin/gl.pl
===================================================================
--- trunk/bin/gl.pl 2009-10-14 16:01:08 UTC (rev 2770)
+++ trunk/bin/gl.pl 2009-10-23 23:43:15 UTC (rev 2771)
@@ -247,6 +247,10 @@
{ ndx => 7, key => 'H', value => $locale->text('Schedule') },
'delete' =>
{ ndx => 8, key => 'D', value => $locale->text('Delete') },
+ 'save_temp' =>
+ { ndx => 9,
+ key => 'T',
+ value => $locale->text('Save Template') },
);
if ($form->{separate_duties}){
@@ -334,7 +338,17 @@
}
+sub save_temp {
+ use LedgerSMB;
+ use LedgerSMB::DBObject::TransTemplate;
+ my $lsmb = LedgerSMB->new();
+ $lsmb->{type} = 'gl';
+ $template = LedgerSMB::DBObject::TransTemplate->new(base => $lsmb);
+ $template->save;
+ $form->redirect( $locale->text('Template Saved!') );
+}
+
sub display_row
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.