diff --git a/app/assets/javascripts/app/lib/app_post/global_search.coffee b/app/assets/javascripts/app/lib/app_post/global_search.coffee index 66baa1cbf..298e2b46a 100644 --- a/app/assets/javascripts/app/lib/app_post/global_search.coffee +++ b/app/assets/javascripts/app/lib/app_post/global_search.coffee @@ -13,15 +13,15 @@ class _globalSearchSingleton extends Spine.Module @apiPath = App.Config.get('api_path') execute: (params) -> - query = params.query - render = params.render - limit = params.limit || 10 - cache_key = query + '_' + limit + query = params.query + render = params.render + limit = params.limit || 10 + cacheKey = "#{query}_#{limit}" # use cache for search result currentTime = new Date - if @searchResultCache[cache_key] && @searchResultCache[cache_key].time > currentTime.setSeconds(currentTime.getSeconds() - 20) - render(@searchResultCache[cache_key].result) + if @searchResultCache[cacheKey] && @searchResultCache[cacheKey].time > currentTime.setSeconds(currentTime.getSeconds() - 20) + render(@searchResultCache[cacheKey].result) return App.Ajax.request( @@ -49,11 +49,11 @@ class _globalSearchSingleton extends Spine.Module App.Log.error('_globalSearchSingleton', "No such model App.#{item.type}") diff = false - if @searchResultCache[cache_key] - diff = difference(@searchResultCache[cache_key].resultRaw, data.result) + if @searchResultCache[cacheKey] + diff = difference(@searchResultCache[cacheKey].resultRaw, data.result) # cache search result - @searchResultCache[cache_key] = + @searchResultCache[cacheKey] = result: result resultRaw: data.result limit: limit diff --git a/app/assets/javascripts/app/views/profile/token_access.jst.eco b/app/assets/javascripts/app/views/profile/token_access.jst.eco index adff82e9f..c893122d5 100644 --- a/app/assets/javascripts/app/views/profile/token_access.jst.eco +++ b/app/assets/javascripts/app/views/profile/token_access.jst.eco @@ -14,7 +14,7 @@ <%- @T('Name') %> - <%- @T('Permission') %> + <%- @T('Permissions') %> <%- @T('Created') %> <%- @T('Expires') %> <%- @T('Last used') %> diff --git a/app/models/channel/driver/pop3.rb b/app/models/channel/driver/pop3.rb index 476ba12be..4af6d3901 100644 --- a/app/models/channel/driver/pop3.rb +++ b/app/models/channel/driver/pop3.rb @@ -47,7 +47,7 @@ returns def fetch (options, channel, check_type = '', verify_string = '') ssl = true port = 995 - if options.key?(:ssl) && options[:ssl].to_s == 'false' + if options.key?(:ssl) && options[:ssl] == false ssl = false port = 110 end