Permalink
Browse files

MDL-30700 tablelib: Fixed get_sort_for_table to work with text sortin…

…g columns for oracle

This change stores the list of columns that require text sorting in the session,
so the static function "get_sort_for_table" can work without any additional parameters.
  • Loading branch information...
damyon committed Dec 13, 2012
1 parent 0887f75 commit 4d8125b1c72e09cd8d1fefeee72fd98155c8edb4
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/tablelib.php
View
@@ -419,6 +419,7 @@ function setup() {
$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];
@@ -513,8 +514,11 @@ public static function get_sort_for_table($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);
}
/**

0 comments on commit 4d8125b

Please sign in to comment.