[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1505] trunk/LedgerSMB/Form.pm



Revision: 1505
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1505&view=rev
Author:   einhverfr
Date:     2007-09-05 11:12:39 -0700 (Wed, 05 Sep 2007)

Log Message:
-----------
Fixing Form::sort_columns

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-09-05 17:59:58 UTC (rev 1504)
+++ trunk/LedgerSMB/Form.pm	2007-09-05 18:12:39 UTC (rev 1505)
@@ -546,6 +546,9 @@
     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};
         }
     }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.