Changeset 1672 for trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases
- Timestamp:
- 01/27/16 13:05:25 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
r1624 r1672 795 795 796 796 # Invalid filter due to impossible value: 797 $attribute->checkinputformat($val) or do{797 if (!$attribute->checkinputformat($val) && $mode ne '~') { 798 798 $base->log(LA_ERR, "Invalid format value $val for attribute $attr"); 799 799 return; 800 } ;800 } 801 801 802 802 $val = $attribute->input($val); … … 813 813 } elsif ($attribute->{inline}) { 814 814 $sql = sprintf( 815 q{select ikey from %s where %s ::text%s},815 q{select ikey from %s where %s%s %s}, 816 816 $base->db->quote_identifier($class->_object_table), 817 ($mode eq '~' ? '::text' : ''), 817 818 $base->db->quote_identifier($attribute->iname), 818 819 $val eq '*' … … 820 821 : $mode eq '~' 821 822 ? 'ILIKE ?' 822 : '= ?'823 : "$mode ?" 823 824 ); 824 825 push(@{$attrbind{$attr}}, $mode eq '~' ? '%' . $val . '%' : $val) unless($val eq '*'); … … 832 833 ? '' 833 834 : $mode eq '~' 834 ? q{and value ILIKE ?}835 : q {and value =?}835 ? q{and value::text ILIKE ?} 836 : qq{and value $mode ?} 836 837 837 838 );
Note: See TracChangeset
for help on using the changeset viewer.