[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5464] trunk
- Subject: SF.net SVN: ledger-smb:[5464] trunk
- From: ..hidden..
- Date: Thu, 03 Jan 2013 02:34:23 +0000
Revision: 5464
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5464&view=rev
Author: einhverfr
Date: 2013-01-03 02:34:23 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
Database fix for Perl pre-5.14 due to inappropriate use of values()
Modified Paths:
--------------
trunk/LedgerSMB/Database.pm
trunk/sql/modules/Employee.sql
Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm 2013-01-02 07:22:10 UTC (rev 5463)
+++ trunk/LedgerSMB/Database.pm 2013-01-03 02:34:23 UTC (rev 5464)
@@ -420,11 +420,10 @@
);
my @results;
for my $r (@$resultref){
- push @results, values @$r;
+ push @results, @$r;
}
$dbh->disconnect;
- use Data::Dumper;
return @results;
}
Modified: trunk/sql/modules/Employee.sql
===================================================================
--- trunk/sql/modules/Employee.sql 2013-01-02 07:22:10 UTC (rev 5463)
+++ trunk/sql/modules/Employee.sql 2013-01-03 02:34:23 UTC (rev 5464)
@@ -134,7 +134,7 @@
CREATE OR REPLACE FUNCTION employee__search
(in_employeenumber text, in_startdate_from date, in_startdate_to date,
in_first_name text, in_middle_name text, in_last_name text,
-in_notes text)
+in_notes text, in_is_user bool)
RETURNS SETOF employee_result as
$$
SELECT p.entity_id, e.control_code, p.id, s.salutation, s.id,
@@ -154,6 +154,8 @@
and ($4 is null or p.first_name ilike '%' || $4 || '%')
and ($5 is null or p.middle_name ilike '%' || $5 || '%')
and ($6 is null or p.last_name ilike '%' || $6 || '%');
+ and ($7 is null
+ or $7 = exists (select 1 from users where entity_id = e.id))
$$ language sql;
COMMENT ON FUNCTION employee__search
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.