From 04be572a926621903e42113f355adf807e5e5157 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 17 Jun 2019 20:07:19 -0400 Subject: [PATCH] Merge diffs from master --- app/controllers/session_controller.rb | 2 +- app/controllers/user_avatars_controller.rb | 1 + lib/backup_restore/backuper.rb | 2 -- spec/components/search_spec.rb | 13 ------------- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb index 7db9bd34dc7..b48ee8a8f14 100644 --- a/app/controllers/session_controller.rb +++ b/app/controllers/session_controller.rb @@ -382,7 +382,7 @@ class SessionController < ApplicationController @error = I18n.t('user_api_key.invalid_token') end - return render json: { error: I18n.t('email_login.invalid_token') } + render layout: 'no_ember' end def forgot_password diff --git a/app/controllers/user_avatars_controller.rb b/app/controllers/user_avatars_controller.rb index 6aa2059bba6..cac63e64e58 100644 --- a/app/controllers/user_avatars_controller.rb +++ b/app/controllers/user_avatars_controller.rb @@ -45,6 +45,7 @@ class UserAvatarsController < ApplicationController params.require(:color) params.require(:version) params.require(:size) + hijack do begin proxy_avatar("https://avatars.discourse.org/#{params[:version]}/letter/#{params[:letter]}/#{params[:color]}/#{params[:size]}.png", Time.new('1990-01-01')) diff --git a/lib/backup_restore/backuper.rb b/lib/backup_restore/backuper.rb index 376631dce3e..51a12410c0a 100644 --- a/lib/backup_restore/backuper.rb +++ b/lib/backup_restore/backuper.rb @@ -48,8 +48,6 @@ module BackupRestore log "Finalizing backup..." @with_uploads ? create_archive : move_dump_backup - - unpause_sidekiq upload_archive after_create_hook diff --git a/spec/components/search_spec.rb b/spec/components/search_spec.rb index 93e74374562..0eff908d6ac 100644 --- a/spec/components/search_spec.rb +++ b/spec/components/search_spec.rb @@ -1259,19 +1259,6 @@ describe Search do results = Search.execute('in:title status:open Discourse') expect(results.posts.length).to eq(1) end - - it 'works irrespective of the order' do - topic = Fabricate(:topic, title: "A topic about Discourse") - Fabricate(:post, topic: topic, raw: "This is another post") - topic2 = Fabricate(:topic, title: "This is another topic") - Fabricate(:post, topic: topic2, raw: "Discourse is awesome") - - results = Search.execute('Discourse in:title status:open') - expect(results.posts.length).to eq(1) - - results = Search.execute('in:title status:open Discourse') - expect(results.posts.length).to eq(1) - end end context 'ignore_diacritics' do