summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-27 15:57:40 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-27 15:57:40 +0000
commitbcad4c564e42b4f5857772da8ff748855f5283ee (patch)
tree4da11ad024a18381570027544cfab40d8f4a84ee
parentf1b4e18c138d7c6e8e44ed364653776b50710fc4 (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--Changelog6
-rwxr-xr-xLedgerSMB/Form.pm46
-rwxr-xr-xLedgerSMB/Mailer.pm5
-rwxr-xr-xLedgerSMB/Session/DB.pm6
-rw-r--r--VERSION2
-rwxr-xr-xbin/arapprn.pl2
-rw-r--r--dists/rpm/ledgersmb.spec2
-rw-r--r--dists/source/build.sh4
8 files changed, 37 insertions, 36 deletions
diff --git a/Changelog b/Changelog
index 1ebb9d20..c2b2c945 100644
--- a/Changelog
+++ b/Changelog
@@ -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};
diff --git a/VERSION b/VERSION
index 689a94d4..5120b2c6 100644
--- a/VERSION
+++ b/VERSION
@@ -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