Merge branch 'MDL-30700-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 13 Dec 2012 09:32:38 +0000 (10:32 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 13 Dec 2012 09:32:38 +0000 (10:32 +0100)
1  2 
lib/tablelib.php

diff --combined lib/tablelib.php
@@@ -419,6 -419,7 +419,7 @@@ class flexible_table 
              $SESSION->flextable[$this->uniqueid]->sortby   = array();
              $SESSION->flextable[$this->uniqueid]->i_first  = '';
              $SESSION->flextable[$this->uniqueid]->i_last   = '';
+             $SESSION->flextable[$this->uniqueid]->textsort = $this->column_textsort;
          }
  
          $this->sess = &$SESSION->flextable[$this->uniqueid];
          if (empty($sess->sortby)) {
              return '';
          }
+         if (empty($sess->textsort)) {
+             $sess->textsort = array();
+         }
  
-         return self::construct_order_by($sess->sortby);
+         return self::construct_order_by($sess->sortby, $sess->textsort);
      }
  
      /**
@@@ -1500,7 -1504,7 +1504,7 @@@ class table_spreadsheet_export_format_p
      }
  
      function start_table($sheettitle) {
 -        $this->worksheet =& $this->workbook->add_worksheet($sheettitle);
 +        $this->worksheet = $this->workbook->add_worksheet($sheettitle);
          $this->rownum=0;
      }