Changeset 1761
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/EmploymentByPeriod.pm
r1758 r1761 34 34 35 35 my @filteredObj = $base->search_objects( 36 'employment', sprintf('firstday<=%s', $end->ymd('-')), sprintf('lastday>=%s', $start->ymd('-')) 36 'employment', sprintf('firstday<=%s', $end->ymd('-')), sprintf('lastday>=%s', $start->ymd('-')), 'lastday=NULL' 37 37 ); 38 38 my %atstart = map { $_ => 1 } $base->search_objects( -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
r1758 r1761 742 742 # attr=foo => no extra white space ! 743 743 # \W is false, it is possible to have two char 744 my ($attr, $mode, $val) = $item =~ /^(\w+)(?:( \W+)(.+))?$/ or next;744 my ($attr, $mode, $val) = $item =~ /^(\w+)(?:([^\w*]+)(.+))?$/ or next; 745 745 if (!$mode) { 746 746 $mode = '~'; … … 776 776 $base->db->quote_identifier($attribute->iname), 777 777 ($mode eq '~' ? '::text' : ''), 778 $ val eq '*'778 $mode eq '=' && $val eq '*' 779 779 ? 'is not NULL' 780 : $mode eq '=' && $val eq 'NULL' 781 ? 'is NULL' 780 782 : $mode eq '~' 781 783 ? 'ILIKE ?' 782 784 : "$mode ?" 783 785 ); 784 push(@{$attrbind{$attr}}, $mode eq '~' ? '%' . $val . '%' : $val) unless($ val eq '*');786 push(@{$attrbind{$attr}}, $mode eq '~' ? '%' . $val . '%' : $val) unless($mode eq '=' && ($val eq '*' || $val eq 'NULL')); 785 787 } else { 786 788 $sql = sprintf(
Note: See TracChangeset
for help on using the changeset viewer.