[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5096] trunk
- Subject: SF.net SVN: ledger-smb:[5096] trunk
- From: ..hidden..
- Date: Sat, 04 Aug 2012 08:47:43 +0000
Revision: 5096
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5096&view=rev
Author: einhverfr
Date: 2012-08-04 08:47:43 +0000 (Sat, 04 Aug 2012)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/Database.pm
trunk/common.pl
trunk/sql/modules/Files.sql
trunk/sql/modules/Parts.sql
trunk/t/04-template-handling.t
trunk/t/40-dbsetup.t
Added Paths:
-----------
trunk/tools/pre-release-tests.sh
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-5082
+ /branches/1.3:3711-5094
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2012-08-04 08:27:46 UTC (rev 5095)
+++ trunk/Changelog 2012-08-04 08:47:43 UTC (rev 5096)
@@ -82,6 +82,10 @@
* Better error handling when date is entered into statement balance (Chris T)
* Added pricegroup selection back to entity credit account (Chris T, 3550056)
* Fix for slow performance with Form->all_years (Chris T, h/t Neil S)
+* Revamped database load test cases (Chris T)
+* Fixed error on some screens with function not found (Chris T)
+* Fixed some test case errors due to tests written against older API (Chris T)
+* Fixed error: parts search not loading into the db pn Pg 9.1 only (Chris T)
Niel S is Neil Smith
@@ -668,6 +672,13 @@
Released 2007-04-04
Currently supported, through at least 2012-03-01
+Changelog for 1.2.27
+* Corrected an issue with redirects (Turtle)
+
+Changelog for 1.2.26
+* Corrected is_zero errors updating ar/ap transactions (Chris T)
+* Corrected is_zero errors printing invoices (Chris T)
+
Changelog for 1.2.25
* Corrected sql injection issue (Chris T)
Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm 2012-08-04 08:27:46 UTC (rev 5095)
+++ trunk/LedgerSMB/Database.pm 2012-08-04 08:47:43 UTC (rev 5096)
@@ -294,7 +294,7 @@
} else {
$retval->{status} = 'does not exist';
}
- my $sth = $dbh->prepare("SELECT SESSION_USER");
+ $sth = $dbh->prepare("SELECT SESSION_USER");
$sth->execute;
$retval->{username} = $sth->fetchrow_array();
return $retval;
Modified: trunk/common.pl
===================================================================
--- trunk/common.pl 2012-08-04 08:27:46 UTC (rev 5095)
+++ trunk/common.pl 2012-08-04 08:47:43 UTC (rev 5096)
@@ -29,6 +29,7 @@
my @common_attrs = qw(
dbh login favicon stylesheet titlebar password custom_db_fields vc header
+ action
);
if ( !$script ) { # http redirect to login.pl if called w/no args
Modified: trunk/sql/modules/Files.sql
===================================================================
--- trunk/sql/modules/Files.sql 2012-08-04 08:27:46 UTC (rev 5095)
+++ trunk/sql/modules/Files.sql 2012-08-04 08:47:43 UTC (rev 5096)
@@ -242,11 +242,11 @@
JOIN entity e ON f.uploaded_by = e.id
WHERE f.ref_key = $1 and f.file_class = $2
AND m.invoice_include
- OR id IN (SELECT max(id)
+ OR f.id IN (SELECT max(fb.id)
FROM file_base fb
JOIN mime_type m ON fb.mime_type_id = m.id
AND m.mime_type ilike 'image%'
- JOIN invoice i ON i.trans_id = in_ref_key
+ JOIN invoice i ON i.trans_id = $1
AND i.parts_id = fb.ref_key
WHERE fb.file_class = 3)
$$ language sql;
Modified: trunk/sql/modules/Parts.sql
===================================================================
--- trunk/sql/modules/Parts.sql 2012-08-04 08:27:46 UTC (rev 5095)
+++ trunk/sql/modules/Parts.sql 2012-08-04 08:47:43 UTC (rev 5096)
@@ -8,9 +8,9 @@
FROM parts
WHERE ($1 IS NULL OR (partnumber like $1 || '%'))
AND ($2 IS NULL
- OR (to_tsvector(get_default_lang()::name, description)
+ OR (description
@@
- plainto_tsquery(get_default_lang()::name, $2)))
+ plainto_tsquery(get_default_lang()::regconfig, $2)))
AND not obsolete
ORDER BY partnumber;
$$ LANGUAGE SQL;
Modified: trunk/t/04-template-handling.t
===================================================================
--- trunk/t/04-template-handling.t 2012-08-04 08:27:46 UTC (rev 5095)
+++ trunk/t/04-template-handling.t 2012-08-04 08:47:43 UTC (rev 5096)
@@ -136,7 +136,7 @@
@r = trap{AM->check_template_name($myconfig, $form)};
if ( $expStackTrace == 0 )
{
- is($trap->die, "Error: Directory transversal not allowed.\n",
+ is($trap->die, "Error: Not in a whitelisted directory: /tmp/apples.txt\n",
'AM, check_template_name: Directory transversal denial 2');
}
else
Modified: trunk/t/40-dbsetup.t
===================================================================
--- trunk/t/40-dbsetup.t 2012-08-04 08:27:46 UTC (rev 5095)
+++ trunk/t/40-dbsetup.t 2012-08-04 08:47:43 UTC (rev 5096)
@@ -3,6 +3,7 @@
use Test::More;
use LedgerSMB::Database;
use LedgerSMB;
+use LedgerSMB::Sysconfig;
use LedgerSMB::DBObject::Admin;
use strict;
use DBI;
@@ -15,6 +16,9 @@
my $temp = $ENV{TEMP} || '/tmp/';
my $run_tests = 1;
+for my $log (qw(dblog dblog_stderr dblog_stdout)){
+ unlink "$LedgerSMB::Sysconfig::tempdir/$log";
+}
for my $evar (qw(LSMB_NEW_DB LSMB_TEST_DB PG_CONTRIB_DIR)){
if (!defined $ENV{$evar}){
$run_tests = 0;
@@ -23,7 +27,7 @@
}
if ($run_tests){
- plan tests => 10;
+ plan tests => 11;
$ENV{PGDATABASE} = $ENV{LSMB_NEW_DB};
}
@@ -40,7 +44,7 @@
# Manual tests
my $rc = $db->create;
-ok(!$rc, 'Database Created')
+ok($rc, 'Database Created')
|| BAIL_OUT('Database could not be created! ' . $rc);
ok($db->load_modules('LOADORDER'), 'Modules loaded');
@@ -50,7 +54,7 @@
close (DBLOCK);
}
-is($db->process_roles('Roles.sql'), 0, 'Roles processed');
+is($db->process_roles('Roles.sql'), 2, 'Roles processed');
#Changed the COA and GIFI loading to use this, and move admin user to
#Database.pm --CT
@@ -91,6 +95,16 @@
$dbh->commit;
};
+open my $log, "< $LedgerSMB::Sysconfig::tempdir/dblog";
+
+my $passed_no_errs = 1;
+while (my $line = <$log>){
+ last if $line =~ /Fixes/i; # Fixes roll back!
+ $passed_no_errs = 0 if $line =~ /Rollback/i;
+}
+
+is($passed_no_errs, 1, 'No rollbacks in db scripts');
+
SKIP: {
skip 'No COA specified', 1 if !defined $ENV{LSMB_LOAD_COA};
is($db->exec_script({script => 'sql/coa/'
Copied: trunk/tools/pre-release-tests.sh (from rev 5094, branches/1.3/tools/pre-release-tests.sh)
===================================================================
--- trunk/tools/pre-release-tests.sh (rev 0)
+++ trunk/tools/pre-release-tests.sh 2012-08-04 08:47:43 UTC (rev 5096)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+sh tools/delete-company-database.sh lsmb13installtest
+
+rm -f /tmp/ledgersmb/dblog*
+
+PGUSER=postgres PGPASSWORD=test LSMB_TEST_DB=1 LSMB_NEW_DB=lsmb13installtest make test
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.