summaryrefslogtreecommitdiff
path: root/LedgerSMB/Form.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/Form.pm')
-rwxr-xr-xLedgerSMB/Form.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index a8da9a94..8af13b55 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -363,6 +363,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};
}
}