diff --git a/Gemfile.lock b/Gemfile.lock index 379101a2c7..b59803ab6a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -271,7 +271,6 @@ GEM openid-redis-store (0.0.2) redis ruby-openid - optimist (3.0.0) parallel (1.12.1) parser (2.5.3.0) ast (~> 2.4.0) @@ -321,10 +320,10 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) - rbtrace (0.4.11) + rbtrace (0.4.10) ffi (>= 1.0.6) msgpack (>= 0.4.3) - optimist (>= 3.0.0) + trollop (>= 1.16.2) rchardet (1.8.0) redis (4.0.1) redis-namespace (1.6.0) @@ -421,6 +420,7 @@ GEM thor (0.19.4) thread_safe (0.3.6) tilt (2.0.8) + trollop (2.1.2) tzinfo (1.2.5) thread_safe (~> 0.1) uglifier (4.1.11) diff --git a/app/assets/stylesheets/common/base/user.scss b/app/assets/stylesheets/common/base/user.scss index caffa6c8a4..b678408b0c 100644 --- a/app/assets/stylesheets/common/base/user.scss +++ b/app/assets/stylesheets/common/base/user.scss @@ -400,44 +400,6 @@ list-style: none; margin: 0; } - - .username, .name { - display: block; - } - - .name { - margin-left: 0; - } -} - -.user-nav { - margin: 5px 0px; - .fa { - margin-right: 5px; - } - .fa.fa-comment { - margin-right: 2px; - } -} - -.user-right .list-actions { - margin-bottom: 10px; - .btn { - margin-right: 10px; - } -} - -.top-section { - ul { - list-style: none; - margin: 0; - } -} - -.top-section, -.replies-section, -.topics-section { - margin-bottom: 20px; } .top-section, diff --git a/app/jobs/onceoff/recover_post_uploads.rb b/app/jobs/onceoff/recover_post_uploads.rb deleted file mode 100644 index ef3fb0b5aa..0000000000 --- a/app/jobs/onceoff/recover_post_uploads.rb +++ /dev/null @@ -1,22 +0,0 @@ -require_dependency "upload_recovery" - -module Jobs - class RecoverPostUploads < Jobs::Onceoff - MIN_PERIOD = 30 - MAX_PERIOD = 120 - - def execute_onceoff(args) - UploadRecovery.new.recover(Post.where( - "baked_at >= ?", - grace_period.days.ago - )) - end - - def grace_period - SiteSetting.purge_deleted_uploads_grace_period_days.clamp( - MIN_PERIOD, - MAX_PERIOD - ) - end - end -end diff --git a/config/locales/client.bs_BA.yml b/config/locales/client.bs_BA.yml index 3f3da51649..70f79f1899 100644 --- a/config/locales/client.bs_BA.yml +++ b/config/locales/client.bs_BA.yml @@ -510,7 +510,6 @@ bs_BA: "14": "Na čekanju." categories: all: "Sve kategorije" - all_subcategories: "sve u %{categoryName}" no_subcategory: "nijedna" category: "Kategorija" category_list: "Prikaži listu kategorija" diff --git a/config/locales/client.pt_BR.yml b/config/locales/client.pt_BR.yml index 71dc01204e..bb4ba1ab9a 100644 --- a/config/locales/client.pt_BR.yml +++ b/config/locales/client.pt_BR.yml @@ -789,9 +789,6 @@ pt_BR: email_always: "Envie-me notificações mesmo quando eu estiver ativo no site." other_settings: "Outros" categories_settings: "Categorias" - enable_mailing_list: - one: "Você tem certeza de que deseja receber um email para cada novo post?" - other: "Você tem certeza de que deseja receber um email para cada novo post?

Isso vai resultar em aproximadamente {{count}} emails por dia." new_topic_duration: label: "Considerar tópicos como novos quando" not_viewed: "Eu ainda não os vi" diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 82a911e030..ddea713c1c 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1682,7 +1682,6 @@ en: levenshtein_distance_spammer_emails: "When matching spammer emails, number of characters difference that will still allow a fuzzy match." max_new_accounts_per_registration_ip: "If there are already (n) trust level 0 accounts from this IP (and none is a staff member or at TL2 or higher), stop accepting new signups from that IP." - min_ban_entries_for_roll_up: "When clicking the Roll up button, will create a new subnet ban entry if there are at least (N) entries." max_age_unmatched_emails: "Delete unmatched screened email entries after (N) days." diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index 816fb2969d..b0b36b2d84 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -3555,35 +3555,6 @@ fr: ## [Changements à notre politique de confidentialité](#changes) Si nous décidons de changer notre politique de confidentialité, nous afficherons ces modifications sur cette page. Ce document est soumis à la licence creative commons CC-BY-SA. Il a été mis à jour le 31 mai 2013. - static: - search_help: | -

Astuces

-

-

-

-

Options

-

- - - - - - - -
order:viewsorder:latestorder:likes@usernameuser:foo
status:openstatus:closedstatus:archivedstatus:norepliesstatus:single_user
#category-slugcategory:foogroup:foobadge:foo
in:likesin:postedin:watchingin:trackingin:private
in:bookmarksin:firstin:pinnedin:unpinnedin:wiki
posts_count:numbefore:days or dateafter:days or datetags:one,two
-

-

Examples

-

-

-

badges: editor: name: Éditeur diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf index 7fd696bca7..48bb7a3c15 100644 --- a/config/nginx.sample.conf +++ b/config/nginx.sample.conf @@ -71,7 +71,7 @@ server { # further more etags are based on the file in nginx not sha of data # use dates, it solves the problem fine even cross server etag off; - + # prevent direct download of backups location ^~ /backups/ { internal; diff --git a/discourse.iml b/discourse.iml deleted file mode 100644 index 13f1cee409..0000000000 --- a/discourse.iml +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/final_destination.rb b/lib/final_destination.rb index c3fff9dcb5..a098df3b52 100644 --- a/lib/final_destination.rb +++ b/lib/final_destination.rb @@ -267,11 +267,6 @@ class FinalDestination return true if SiteSetting.whitelist_internal_hosts.split("|").any? { |h| h.downcase == @uri.hostname.downcase } end - # Whitelisted hosts - return true if hostname_matches?(SiteSetting.s3_cdn_url) || - hostname_matches?(GlobalSetting.try(:cdn_url)) || - hostname_matches?(Discourse.base_url_no_prefix) - address_s = @opts[:lookup_ip].call(@uri.hostname) return false unless address_s diff --git a/lib/upload_creator.rb b/lib/upload_creator.rb index fcc005632d..a1386feb2e 100644 --- a/lib/upload_creator.rb +++ b/lib/upload_creator.rb @@ -49,10 +49,10 @@ class UploadCreator elsif !Rails.env.test? || @opts[:force_optimize] convert_to_jpeg! if should_convert_to_jpeg? downsize! if should_downsize? - fix_orientation! if should_fix_orientation? return @upload if is_still_too_big? + fix_orientation! if should_fix_orientation? crop! if should_crop? optimize! if should_optimize? end diff --git a/lib/validators/upload_url_validator.rb b/lib/validators/upload_url_validator.rb index 67f1e7af67..7823478aa7 100644 --- a/lib/validators/upload_url_validator.rb +++ b/lib/validators/upload_url_validator.rb @@ -7,7 +7,7 @@ class UploadUrlValidator < ActiveModel::EachValidator rescue URI::Error end - unless uri && Discourse.store.has_been_uploaded?(value) + unless uri && Upload.exists?(url: value) record.errors[attribute] << (options[:message] || I18n.t('errors.messages.invalid')) end end diff --git a/public/images/emoji/emoji_one/sushing_face.png b/public/images/emoji/emoji_one/sushing_face.png new file mode 100644 index 0000000000..b792bac92a Binary files /dev/null and b/public/images/emoji/emoji_one/sushing_face.png differ diff --git a/public/images/emoji/facebook_messenger/sushing_face.png b/public/images/emoji/facebook_messenger/sushing_face.png new file mode 100644 index 0000000000..cd0c5b5401 Binary files /dev/null and b/public/images/emoji/facebook_messenger/sushing_face.png differ diff --git a/public/images/emoji/google/sushing_face.png b/public/images/emoji/google/sushing_face.png new file mode 100644 index 0000000000..aa287807f1 Binary files /dev/null and b/public/images/emoji/google/sushing_face.png differ diff --git a/public/images/emoji/twitter/sushing_face.png b/public/images/emoji/twitter/sushing_face.png new file mode 100644 index 0000000000..e4427cbd15 Binary files /dev/null and b/public/images/emoji/twitter/sushing_face.png differ diff --git a/spec/jobs/recover_post_uploads_spec.rb b/spec/jobs/recover_post_uploads_spec.rb deleted file mode 100644 index 0448bc9adc..0000000000 --- a/spec/jobs/recover_post_uploads_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'rails_helper' - -RSpec.describe Jobs::RecoverPostUploads do - describe '#grace_period' do - it 'should restrict the grace period to the right range' do - SiteSetting.purge_deleted_uploads_grace_period_days = - described_class::MIN_PERIOD - 1 - - expect(described_class.new.grace_period).to eq(30) - - SiteSetting.purge_deleted_uploads_grace_period_days = - described_class::MAX_PERIOD + 1 - - expect(described_class.new.grace_period).to eq(120) - end - end -end diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 33664ab13b..37ef673643 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -256,28 +256,6 @@ describe Group do end end - it "does not reset the localized name" do - begin - default_locale = SiteSetting.default_locale - I18n.locale = SiteSetting.default_locale = 'fi' - - group = Group.find(Group::AUTO_GROUPS[:everyone]) - group.update!(name: I18n.t("groups.default_names.everyone")) - - Group.refresh_automatic_group!(:everyone) - - expect(group.reload.name).to eq(I18n.t("groups.default_names.everyone")) - - I18n.locale = SiteSetting.default_locale = 'en' - - Group.refresh_automatic_group!(:everyone) - - expect(group.reload.name).to eq(I18n.t("groups.default_names.everyone")) - ensure - I18n.locale = SiteSetting.default_locale = default_locale - end - end - it "uses the localized name if name has not been taken" do begin default_locale = SiteSetting.default_locale diff --git a/spec/models/topic_embed_spec.rb b/spec/models/topic_embed_spec.rb index 3e51111930..b9e1247929 100644 --- a/spec/models/topic_embed_spec.rb +++ b/spec/models/topic_embed_spec.rb @@ -105,20 +105,6 @@ describe TopicEmbed do end end - context '.topic_id_for_embed' do - it "returns correct topic id irrespective of url protocol" do - topic_embed = Fabricate(:topic_embed, embed_url: "http://example.com/post/248") - - expect(TopicEmbed.topic_id_for_embed('http://exAMPle.com/post/248')).to eq(topic_embed.topic_id) - expect(TopicEmbed.topic_id_for_embed('https://example.com/post/248/')).to eq(topic_embed.topic_id) - - expect(TopicEmbed.topic_id_for_embed('http://example.com/post/248/2')).to eq(nil) - expect(TopicEmbed.topic_id_for_embed('http://examples.com/post/248')).to eq(nil) - expect(TopicEmbed.topic_id_for_embed('http://example.com/post/24')).to eq(nil) - expect(TopicEmbed.topic_id_for_embed('http://example.com/post')).to eq(nil) - end - end - describe '.find_remote' do context ".title_scrub" do diff --git a/spec/serializers/user_serializer_spec.rb b/spec/serializers/user_serializer_spec.rb index b2f1cb5f30..505294d118 100644 --- a/spec/serializers/user_serializer_spec.rb +++ b/spec/serializers/user_serializer_spec.rb @@ -238,31 +238,6 @@ describe UserSerializer do end - context "with user fields" do - let(:user) { Fabricate(:user) } - - let! :fields do - [ - Fabricate(:user_field), - Fabricate(:user_field), - Fabricate(:user_field, show_on_profile: true), - Fabricate(:user_field, show_on_user_card: true), - Fabricate(:user_field, show_on_user_card: true, show_on_profile: true) - ] - end - - let(:other_user_json) { UserSerializer.new(user, scope: Guardian.new(Fabricate(:user)), root: false).as_json } - let(:self_json) { UserSerializer.new(user, scope: Guardian.new(user), root: false).as_json } - let(:admin_json) { UserSerializer.new(user, scope: Guardian.new(Fabricate(:admin)), root: false).as_json } - - it "includes the correct fields for each audience" do - expect(admin_json[:user_fields].keys).to contain_exactly(*fields.map { |f| f.id.to_s }) - expect(other_user_json[:user_fields].keys).to contain_exactly(*fields[2..5].map { |f| f.id.to_s }) - expect(self_json[:user_fields].keys).to contain_exactly(*fields.map { |f| f.id.to_s }) - end - - end - context "with user_api_keys" do let(:user) { Fabricate(:user) } diff --git a/spec/services/search_indexer_spec.rb b/spec/services/search_indexer_spec.rb index 2df395930a..3886eb025a 100644 --- a/spec/services/search_indexer_spec.rb +++ b/spec/services/search_indexer_spec.rb @@ -63,27 +63,6 @@ describe SearchIndexer do expect(scrubbed).to eq("Discourse 51%20PM Untitled design (21).jpg Untitled%20design%20(21) Untitled design (21).jpg 1280x1136 472 KB") end - it "doesn't index local files" do - html = <<~HTML -

Discourse

-

51%20PM

- - HTML - - scrubbed = SearchIndexer::HtmlScrubber.scrub(html).gsub(/\s+/, " ") - - expect(scrubbed).to eq(" Discourse 51%20PM Untitled design (21).jpg Untitled%20design%20(21) Untitled design (21).jpg 1280x1136 472 KB ") - end - it 'correctly indexes a post according to version' do # Preparing so that they can be indexed to right version SearchIndexer.update_posts_index(post_id, "dummy", "", nil, nil)