Commit Graph

31272 Commits

Author SHA1 Message Date
Maja Komel 6c8069c65a FIX: properly escape embed url 2019-01-07 18:11:43 +01:00
Arpit Jalan e0bc82657b FIX: better accept invite flow when user is invited via a link 2019-01-07 14:22:08 +05:30
Sam 77d947701c DEV: Add missing discourse script to docker dev 2019-01-07 13:10:37 +11:00
Sam 37088c4221 PERF: index on topic_id for user_histories table
We query this table when getting composer messages with the queries
such as:

```
SELECT  1 AS one FROM "user_histories"
WHERE "user_histories"."target_user_id" = 1 AND
 "user_histories"."action" = 9 AND
 "user_histories"."topic_id" = 105794
LIMIT 1
```

This index ensures this query remains very quick, regardless of user
history size.
2019-01-06 15:14:41 +11:00
Joe effb3262a1
UX: no need for margin if participants is first-child 2019-01-06 00:11:53 +08:00
Joe 3a9fea4409
align and truncate header tags and participants 2019-01-05 23:09:44 +08:00
Vinoth Kannan 046e4ab413 FIX: Improve topic small header alignment in mobile
Force topic-header-extra height to 20px
2019-01-05 14:06:06 +05:30
Vinoth Kannan 3589f3e023 UX: Display user and group cards over the small PM header 2019-01-05 04:58:56 +05:30
Vinoth Kannan aba18a42a7 UX: Improve PM small header alignment with recipient avatars 2019-01-05 03:51:15 +05:30
Rishabh efc481d9c0 DEV: Use puts instead of printing newline (follow up on c5b7bda1) 2019-01-05 01:20:00 +05:30
Robin Ward 5eaf3cb104 Adjusts the `minimum_flag_threshold` for TL3/TL4 actions
Before this patch, a high trust level user could flag something
and have an action be taken, as well as skipping the flag queue.

Now, if a TL3/TL4 cause an action, the flag will skip the minimum
visibility check and allow staff to review it.
2019-01-04 13:16:44 -05:00
Régis Hanol 5ac1e3d4cd FIX: emojis are hard 🤷 2019-01-04 17:21:16 +01:00
Penar Musaraj f400830575 DEV: Remove old _firefoxPastingHack 2019-01-04 11:14:35 -05:00
Gerhard Schlager 858a456aaf FEATURE: Use email_site_title in From of digest emails 2019-01-04 17:06:19 +01:00
Gerhard Schlager c0a8bb9a91 FEATURE: Include "via <site_name>" in email From header 2019-01-04 17:06:19 +01:00
Régis Hanol 788719d271 DEV: speed up posts base imports 2019-01-04 15:30:17 +01:00
Régis Hanol 95e5f8380d FEATURE: Allow plugins to add custom emoji translations
FIX: buildTranslationTree was erroring when translations overlapped (ie. ":-)" and ":-))")
FIX: emoji translations wasn't working properly when translations overlapped
2019-01-04 15:27:46 +01:00
Régis Hanol 88e861e895 FIX: prevent error when badge has already been awarded 2019-01-04 15:17:54 +01:00
David Taylor 5bf16d7d10 FEATURE: Topic timer for bumping a topic in the future 2019-01-04 13:08:04 +00:00
Rishabh c5b7bda198 DEV: Show migrate_to_s3 output on a new line 2019-01-04 18:09:54 +05:30
Vinoth Kannan 902f535111 FIX: upload method in S3Helper will expect a file object param 2019-01-04 15:30:45 +05:30
Vinoth Kannan 82d7f9ce5e fix the build
Checking size for a file object directly will cause issue if it is a closed stream
2019-01-04 13:25:11 +05:30
Sam 9c91e68351 PERF: remove image optimization throttling from Sidekiq
Previously we only allowed one image optimization per machine, this meant there
was cross talk between avatar resizing and Sidekiq. This could lead to large
amounts of starvation when optimized image version changed which in turn could
block the Sidekiq queue.

This increases amount of allowed load on machines but this is preferable to
having crosstalk between avatar resizing and Sidekiq.
2019-01-04 18:44:44 +11:00
Vinoth Kannan 940a61037c DEV: Add option to pass s3 client in param 2019-01-04 12:16:09 +05:30
Vinoth Kannan 75dbb98cca FEATURE: Add S3 etag value to uploads table (#6795) 2019-01-04 14:16:22 +08:00
Joe 3a04e04ccb UX: excerpts don't wrap on IE11 (#6847) 2019-01-04 15:11:42 +11:00
Sam 8b7a2d1cb7 FEATURE: add setting to bypass sending redis CLIENT commands
Some cloud providers (Google Memorystore) do not support any CLIENT commands

By setting :id to nil in the redis config hash we can avoid these commands.

This adds a special global setting GCE users can enable:
`DISCOURSE_REDIS_SKIP_CLIENT_COMMANDS = true`
2019-01-04 15:08:33 +11:00
Sam 8f35fd4595 FEATURE: remove global settings for redis sentinels
This global setting is never used, configuring Discourse with sentinel is
unsupported.
2019-01-04 15:08:33 +11:00
Kris a2f1d47506 Slightly better alignment of PM participants in header 2019-01-03 22:47:56 -05:00
cfitz 19d7545318 FEATURE: Make auth_redirect param options on user_api_keys
This is a possible solution for https://meta.discourse.org/t/user-api-keys-specification/48536/19
This allows for user-api-key requests to not require a redirect url.
Instead, the encypted payload will just be displayed after creation  ( which can be copied
pasted into an env for a CLI, for example  )

Also: Show instructions when creating user-api-key w/out redirect

This adds a view to show instructions when requesting a user-api-key
without a redirect. It adds a erb template and json format.
Also adds a i18n user_api_key.instructions for server.en.yml
2019-01-04 14:46:18 +11:00
Sam d0f38dbb07 FIX: image rendered temporarily in wrong position while loading
Previously non lightboxed images would render in the wrong spot while loading.

We assumed the image we were rendering while loading was at 0,0 position.
This is not the case on non-lightboxed images cause they have no surrounding
DIV.
2019-01-04 11:50:44 +11:00
Jeff Atwood d7a82f146a minor copyedit 2019-01-03 16:47:39 -08:00
Joshua Rosenfeld e74dd273b9
UX: Update site setting description to match current function 2019-01-03 19:08:25 -05:00
Guo Xiang Tan 5f0f7f909d FIX: Incorrect CDN URL for site setting uploads when s3 is enabled. 2019-01-04 07:52:13 +08:00
Sam 6961a4f43e Revert "Revert "FEATURE: force rebake of all posts with images""
This reverts commit cb317430a1.
No longer needed per: 70269c7c97
2019-01-04 09:25:04 +11:00
Sam 70269c7c97 FEATURE: tighter limits on per cluster post rebakes
We have the periodical job that regularly will rebake old posts. This is
used to trickle in update to cooked markdown. The problem is that each rebake
can issue multiple background jobs (post process and pull hotlinked images)

Previously we had no per-cluster limit so cluster running 100s of sites could
flood the sidekiq queue with rebake related jobs.

New system introduces a hard limit of 300 rebakes per 15 minutes across a
cluster to ensure the sidekiq job is not dominated by this.

We also reduced `rebake_old_posts_count` to 80, which is a safer default.
2019-01-04 09:24:46 +11:00
Sam e2dca641c6 handle exceptions in s3:correct_acl task
We need to handle arbitrary exceptions in this task, especially since the
task is not easily resumable.

Simply output problem uploads as you hit them for now.
2019-01-04 08:32:09 +11:00
Sam 05a3e3670f FEATURE: add rake task that resets ACL on every object in S3
Some previous migrations to S3 may have bad ACLs set on objects. This
introduces a new rake task (`rake s3:correct_acl`) that will reset ACL on
every S3 object.

Vast majority of users will never have to run it, but if you have ACL issues
this is the atomic solution.
2019-01-04 08:13:43 +11:00
Vinoth Kannan 385829d7be FEATURE: Display error message when category restriction is applied for tags 2019-01-04 00:29:13 +05:30
David Taylor cb317430a1 Revert "FEATURE: force rebake of all posts with images"
This reverts commit 30a1d29a7e due to performance issues on large clusters
2019-01-03 17:52:31 +00:00
Gerhard Schlager b089ac1537 FIX: Posting without bump raised an error for TL4 2019-01-03 14:14:02 +01:00
Gerhard Schlager 4aa3992757
Fix Travis build
Travis doesn't provide the latest Rubygems yet and it doesn't make sense to use Bundler 2 until we've upgraded anyway.
2019-01-03 13:46:21 +01:00
Arpit Jalan d1597683f3 Revert "FIX: trim trailing slash from topic links"
This reverts commit 993f847a2c.

There is an edge case where the link click redirect fails when the URL has trailing slash. Need to figure out a better fix for this.
2019-01-03 17:29:22 +05:30
Guo Xiang Tan c666ef556d Fix the build.
Ref 570877da3c
2019-01-03 15:34:39 +08:00
Arpit Jalan 993f847a2c FIX: trim trailing slash from topic links 2019-01-03 12:38:36 +05:30
Sam 30a1d29a7e FEATURE: force rebake of all posts with images
This was done to pick up 3 changes

1. New pngquant which will result in much smaller images
2. Placeholder images which are missing from old posts
3. Retina images missing from old posts

Also picks up on Image Magick upgrade which slightly alters resize algorithm.

Rebake trickles per: `rebake_old_posts_count` site setting. (100 per 15 minutes)
2019-01-03 17:19:38 +11:00
Sam 570877da3c FEATURE: store thumbnail algorithm version in optimized image table
Previously we had no idea what algorithm generated thumbnails, this starts tracking the version.

We also bumped up the version to force all optimized images to be generated. This is important cause we recently introduced pngquant which results in much smaller images.
2019-01-03 17:07:30 +11:00
Arpit Jalan bea7a8a4d1 FIX: show accurate error message based on invite token validity 2019-01-03 07:46:05 +05:30
Penar Musaraj a953b71797 FEATURE: allow custom HighlightJS languages
Adds pluginApi function that allows themes and plugins to register languages for HighlightJS.
2019-01-02 19:07:36 -05:00
Kris 4af7471ead Better contrast ratio match between dark and light themes 2019-01-02 17:54:22 -05:00