[Rt-commit] r17318 - rt/3.8/branches/3.8.2-releng/lib/RT
falcone at bestpractical.com
falcone at bestpractical.com
Tue Dec 23 16:59:11 EST 2008
Author: falcone
Date: Tue Dec 23 16:59:10 2008
New Revision: 17318
Modified:
rt/3.8/branches/3.8.2-releng/lib/RT/Tickets_Overlay.pm
Log:
merge down Oracle CF search fix from trunk
Modified: rt/3.8/branches/3.8.2-releng/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/3.8/branches/3.8.2-releng/lib/RT/Tickets_Overlay.pm (original)
+++ rt/3.8/branches/3.8.2-releng/lib/RT/Tickets_Overlay.pm Tue Dec 23 16:59:10 2008
@@ -1344,6 +1344,13 @@
$null_columns_ok = 1;
}
+ my $fix_op = sub {
+ my $op = shift;
+ return $op unless RT->Config->Get('DatabaseType') eq 'Oracle';
+ return 'MATCHES' if $op eq '=';
+ return 'NOT MATCHES' if $op eq '!=';
+ };
+
my $cfkey = $cfid ? $cfid : "$queue.$field";
my ($TicketCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field );
@@ -1358,7 +1365,7 @@
$self->_SQLLimit(
ALIAS => $TicketCFs,
FIELD => $column,
- OPERATOR => $op,
+ OPERATOR => ($column ne 'LargeContent'? $op : $fix_op->($op)),
VALUE => $value,
%rest
);
@@ -1392,7 +1399,7 @@
$self->_SQLLimit(
ALIAS => $TicketCFs,
FIELD => 'LargeContent',
- OPERATOR => $op,
+ OPERATOR => $fix_op->($op),
VALUE => $value,
ENTRYAGGREGATOR => 'AND',
);
More information about the Rt-commit
mailing list