widget_list 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/widget_list.rb CHANGED
@@ -2379,7 +2379,7 @@ module WidgetList
2379
2379
  $_SESSION['LIST_COL_SORT'][@sqlHash].each_with_index { |order,void|
2380
2380
  if @items['fields'].key?(order[0])
2381
2381
  foundColumn = true
2382
- pieces['<!--ORDERBY-->'] += tick_field() + strip_aliases(order[0]) + tick_field() + " " + strip_aliases(order[1])
2382
+ pieces['<!--ORDERBY-->'] += tick_field() + strip_aliases(order[0]) + tick_field() + " " + order[1]
2383
2383
  end
2384
2384
  } if $_SESSION.key?('LIST_COL_SORT') && $_SESSION['LIST_COL_SORT'].class.name == 'Hash' && $_SESSION['LIST_COL_SORT'].key?(@sqlHash)
2385
2385
  end
@@ -2387,11 +2387,11 @@ module WidgetList
2387
2387
  # Add base order by
2388
2388
  if ! @items['orderBy'].empty?
2389
2389
  pieces['<!--ORDERBY-->'] += ',' if foundColumn == true
2390
- pieces['<!--ORDERBY-->'] += strip_aliases(@items['orderBy'])
2390
+ pieces['<!--ORDERBY-->'] += @items['orderBy']
2391
2391
  end
2392
2392
 
2393
2393
  elsif !@items['orderBy'].empty?
2394
- pieces['<!--ORDERBY-->'] += ' ORDER BY ' + strip_aliases(@items['orderBy'])
2394
+ pieces['<!--ORDERBY-->'] += ' ORDER BY ' + @items['orderBy']
2395
2395
  end
2396
2396
 
2397
2397
  if get_database.db_type == 'oracle' && pieces['<!--ORDERBY-->'].empty?
@@ -2440,6 +2440,7 @@ module WidgetList
2440
2440
  end
2441
2441
 
2442
2442
  def strip_aliases(name='')
2443
+ name = (name.include?(' ') ? name.split(' ').last : name)
2443
2444
  ((name.include?('.')) ? name.split('.').last.gsub(/'||"/,'') : name.gsub(/'||"/,''))
2444
2445
  end
2445
2446
 
@@ -1,3 +1,3 @@
1
1
  module WidgetList
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: widget_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-28 00:00:00.000000000 Z
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel