View | Details | Raw Unified | Return to bug 36520
Collapse All | Expand All

(-)a/C4/Letters.pm (-2 / +2 lines)
Lines 1890-1895 sub _get_tt_params { Link Here
1890
        },
1890
        },
1891
    };
1891
    };
1892
1892
1893
    my $dbh = C4::Context->dbh;
1893
    foreach my $table ( keys %$tables ) {
1894
    foreach my $table ( keys %$tables ) {
1894
        next unless $config->{$table};
1895
        next unless $config->{$table};
1895
1896
Lines 1915-1921 sub _get_tt_params { Link Here
1915
                            # field is a MySQLism, but they are no other way to do it
1916
                            # field is a MySQLism, but they are no other way to do it
1916
                            # To be generic we could do it in perl, but we will need to fetch
1917
                            # To be generic we could do it in perl, but we will need to fetch
1917
                            # all the data then order them
1918
                            # all the data then order them
1918
                        @$values ? ( order_by => \[ "field($key, " . join( ', ', @$values ) . ")" ] ) : ()
1919
                        @$values ? ( order_by => \[ sprintf "field(%s, %s)", $dbh->quote($key), join( ', ', @$values ) ] ) : ()
1919
                    }
1920
                    }
1920
                );
1921
                );
1921
                $params->{ $config->{$table}->{plural} } = $objects;
1922
                $params->{ $config->{$table}->{plural} } = $objects;
1922
- 

Return to bug 36520