... | ... |
@@ -331,14 +331,10 @@ sub execute { |
331 | 331 |
# Tables |
332 | 332 |
unshift @$tables, @{$query->{tables} || []}; |
333 | 333 |
my $main_table = @{$tables}[-1]; |
334 |
- if (@$tables > 1) { |
|
335 |
- # DEPRECATED logic |
|
336 |
- $tables = $self->_remove_duplicate_table($tables, $main_table); |
|
337 |
- if (my $q = $self->_quote) { |
|
338 |
- $q = quotemeta($q); |
|
339 |
- $_ =~ s/[$q]//g for @$tables; |
|
340 |
- } |
|
341 |
- } |
|
334 |
+ |
|
335 |
+ # DEPRECATED! |
|
336 |
+ $tables = $self->_remove_duplicate_table($tables, $main_table) |
|
337 |
+ if @$tables > 1; |
|
342 | 338 |
|
343 | 339 |
# Type rule |
344 | 340 |
my $type_filters = {}; |
... | ... |
@@ -1394,7 +1390,13 @@ sub _remove_duplicate_table { |
1394 | 1390 |
my %tables = map {defined $_ ? ($_ => 1) : ()} @$tables; |
1395 | 1391 |
delete $tables{$main_table} if $main_table; |
1396 | 1392 |
|
1397 |
- return [keys %tables, $main_table ? $main_table : ()]; |
|
1393 |
+ my $new_tables = [keys %tables, $main_table ? $main_table : ()]; |
|
1394 |
+ if (my $q = $self->_quote) { |
|
1395 |
+ $q = quotemeta($q); |
|
1396 |
+ $_ =~ s/[$q]//g for @$new_tables; |
|
1397 |
+ } |
|
1398 |
+ |
|
1399 |
+ return $new_tables; |
|
1398 | 1400 |
} |
1399 | 1401 |
|
1400 | 1402 |
sub _search_tables { |