From d30c84746a6d9dad428711cf3dcd3cc15dfb84c8 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 5 Sep 2007 18:12:39 +0000 Subject: Fixing Form::sort_columns git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1505 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index dcdca9a6..723e86bf 100644 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -546,6 +546,9 @@ sub sort_columns { if ( $self->{sort} ) { if (@columns) { @columns = grep !/^$self->{sort}$/, @columns; + if ($self->{sort} !~ /^\d*$/){ + $self->{sort} = $self->{dbh}->quote_identifier($self->{sort}); + } splice @columns, 0, 0, $self->{sort}; } } -- cgit v1.2.3