diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-27 15:57:40 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-27 15:57:40 +0000 |
commit | bcad4c564e42b4f5857772da8ff748855f5283ee (patch) | |
tree | 4da11ad024a18381570027544cfab40d8f4a84ee | |
parent | f1b4e18c138d7c6e8e44ed364653776b50710fc4 (diff) |
* Fixed user@company logins
* Fixed closed books detection
* Fixed AR/AP print and post endless loop
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1336 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | Changelog | 6 | ||||
-rwxr-xr-x | LedgerSMB/Form.pm | 46 | ||||
-rwxr-xr-x | LedgerSMB/Mailer.pm | 5 | ||||
-rwxr-xr-x | LedgerSMB/Session/DB.pm | 6 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rwxr-xr-x | bin/arapprn.pl | 2 | ||||
-rw-r--r-- | dists/rpm/ledgersmb.spec | 2 | ||||
-rw-r--r-- | dists/source/build.sh | 4 |
8 files changed, 37 insertions, 36 deletions
@@ -1,3 +1,8 @@ +Changelog for 1.2.7 +* Fixed user@company logins (Chris T) +* Fixed closed books detection (Chris T) +* Fixed AR/AP print and post endless loop (Chris T) + Changelog for 1.2.6 * More date tests added (Seneca) * Fixed customer_id error in AP transactions (Chris T) @@ -7,6 +12,7 @@ Changelog for 1.2.6 * Fixed error searching for customer by address (Chris T) * Fixed error db error saving items with custom fields (Chris T) * Fixed db error saving project with NULL customer id (Chris T) +* Improved upgrade_templates' tag handling (Seneca) Changelog for 1.2.5 * Partsgroup handling corrected on POS and Sales invoice screens (Chris T) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 5d539185..b7a33278 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -76,14 +76,14 @@ sub new { $self->{nextsub} =~ s/( |-|,|\#|\/|\.$)/_/g; } - $self->{login} =~ s/[^a-zA-Z0-9._+@'-]//g; + $self->{login} =~ s/[^a-zA-Z0-9._+\@'-]//g; $self->{menubar} = 1 if $self->{path} =~ /lynx/i; #menubar will be deprecated, replaced with below $self->{lynx} = 1 if $self->{path} =~ /lynx/i; - $self->{version} = "1.2.6"; + $self->{version} = "1.2.7"; $self->{dbversion} = "1.2.0"; bless $self, $type; @@ -2340,32 +2340,26 @@ sub create_links { $sth->finish; - for (qw(curr closedto revtrans)) { - $query = qq| - SELECT value FROM defaults - WHERE setting_key = '$_'|; - - $sth = $dbh->prepare($query); - $sth->execute || $self->dberror($query); - - ($val) = $sth->fetchrow_array(); - if ( $_ eq 'curr' ) { - $self->{currencies} = $val; - } - else { - $self->{$_} = $val; - } - $sth->finish; - } } else { - for (qw(curr closedto revtrans)) { - $query = qq| + if ( !$self->{"$self->{vc}_id"} ) { + $self->lastname_used( $myconfig, $dbh, $vc, $module ); + } + } + for (qw(current_date curr closedto revtrans)) { + if ($_ eq 'current_date'){ + $query = "SELECT $_"; + } elsif ($_ eq 'closedto'){ + $query = qq| + SELECT value::date FROM defaults + WHERE setting_key = '$_'|; + } else { + $query = qq| SELECT value FROM defaults WHERE setting_key = '$_'|; - + } $sth = $dbh->prepare($query); $sth->execute || $self->dberror($query); @@ -2378,13 +2372,7 @@ sub create_links { } $sth->finish; } - - $self->{transdate} = $self->current_date; - if ( !$self->{"$self->{vc}_id"} ) { - $self->lastname_used( $myconfig, $dbh, $vc, $module ); - } - } - + $self->{transdate} = $self->{current_date} if (!$self->{id}); $self->all_vc( $myconfig, $vc, $module, $dbh, $self->{transdate}, $job ); $self->{dbh}->commit; } diff --git a/LedgerSMB/Mailer.pm b/LedgerSMB/Mailer.pm index eb1d4a9b..0e14c8f4 100755 --- a/LedgerSMB/Mailer.pm +++ b/LedgerSMB/Mailer.pm @@ -50,10 +50,13 @@ sub send { my ($self) = @_; my $domain = $self->{from}; + my $boundary = time; + $boundary = "LSMB-$boundary"; $domain =~ s/(.*?\@|>)//g; my $msgid = "$boundary\@$domain"; $self->{contenttype} = "text/plain" unless $self->{contenttype}; + my $msgid = "$boundary\@$domain"; my %h; for (qw(from to cc bcc)) { @@ -77,7 +80,9 @@ sub send { 'Subject' => $self->{subject}, 'Type' => 'TEXT', 'Data' => $self->{message}, + 'Message-ID' => $msg_id, ); + $msg->attr("Content-Type" => $self->{contenttype}); $msg->add( 'Disposition-Notification-To' => $self->{from} ) if $self->{notify}; $msg->replace( 'X-Mailer' => "LedgerSMB $self->{version}" ); diff --git a/LedgerSMB/Session/DB.pm b/LedgerSMB/Session/DB.pm index df9b36ff..600ebcae 100755 --- a/LedgerSMB/Session/DB.pm +++ b/LedgerSMB/Session/DB.pm @@ -170,7 +170,7 @@ sub session_create { # this is assuming that $form->{login} is safe, which might be a bad assumption # so, I'm going to remove some chars, which might make previously valid logins invalid my $login = $form->{login}; - $login =~ s/[^a-zA-Z0-9._+@'-]//g; + $login =~ s/[^a-zA-Z0-9._+\@'-]//g; #delete any existing stale sessions with this login if they exist if ( !$myconfig{timeout} ) { @@ -211,7 +211,7 @@ sub session_destroy { my ($form) = @_; my $login = $form->{login}; - $login =~ s/[^a-zA-Z0-9._+@'-]//g; + $login =~ s/[^a-zA-Z0-9._+\@'-]//g; # use the central database handle my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH}; @@ -236,7 +236,7 @@ sub password_check { my ( $form, $username, $password ) = @_; - $username =~ s/[^a-zA-Z0-9._+@'-]//g; + $username =~ s/[^a-zA-Z0-9._+\@'-]//g; # use the central database handle my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH}; @@ -1 +1 @@ -1.2.6 +1.2.7 diff --git a/bin/arapprn.pl b/bin/arapprn.pl index 397a624c..2d5bf189 100755 --- a/bin/arapprn.pl +++ b/bin/arapprn.pl @@ -132,6 +132,8 @@ sub print { } if ( $form->{printandpost} ) { + delete $form->{printandpost}; + $form->{action} = 'post'; &post; } else { diff --git a/dists/rpm/ledgersmb.spec b/dists/rpm/ledgersmb.spec index d61e5d9f..4cf487d3 100644 --- a/dists/rpm/ledgersmb.spec +++ b/dists/rpm/ledgersmb.spec @@ -1,7 +1,7 @@ # RPM spec written for and tested on Fedora Core 6 Summary: LedgerSMB - Open Source accounting software Name: ledgersmb -Version: 1.2.6 +Version: 1.2.7 Release: 1 License: GPL URL: http://www.ledgersmb.org/ diff --git a/dists/source/build.sh b/dists/source/build.sh index 31de6294..481ed825 100644 --- a/dists/source/build.sh +++ b/dists/source/build.sh @@ -9,8 +9,8 @@ else pgdoc="true"; fi -version="1.2.6"; -rpmversion="1.2.6"; +version="1.2.7"; +#rpmversion="1.2.6"; build_d="../release"; if test -d blib; then |