summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-05 18:12:39 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-05 18:12:39 +0000
commitd30c84746a6d9dad428711cf3dcd3cc15dfb84c8 (patch)
tree15e4e9b5f28531e9cdc4943e430dfd38244c5bfe
parentf0ac3781f1a75e5c82434b7d78a5c3e0f6027eb2 (diff)
Fixing Form::sort_columns
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1505 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/Form.pm3
1 files changed, 3 insertions, 0 deletions
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};
}
}