Commit Graph

33602 Commits

Author SHA1 Message Date
Joffrey JAFFEUX 69f75b2a81
REFACTOR: preferences/account controller (#7698) 2019-06-05 10:37:51 +02:00
Sam Saffron 19e3b3b1bc PERF: speed up topic poster lookups
During profiling looking up topic users popped up as a hot path, this
change more than halved the amount of work it does

It reduces object allocations and method calls and avoids repeate translation
of common terms
2019-06-05 18:28:36 +10:00
Joffrey JAFFEUX ce79a71c5d
typo s/faivcon/favicon (#7697) 2019-06-05 09:46:07 +02:00
Sam Saffron b9df7a2257 FIX: if favicon is missing due to bad url we would return a 500 on favicons
This ensures that the error logging does not corrupt the cache
2019-06-05 16:43:40 +10:00
Sam Saffron 62141b6316 FEATURE: enable_performance_http_headers for performance diagnostics
This adds support for DISCOURSE_ENABLE_PERFORMANCE_HTTP_HEADERS
when set to `true` this will turn on performance related headers

```text
X-Redis-Calls: 10     # number of redis calls
X-Redis-Time: 1.02    # redis time in seconds
X-Sql-Commands: 102   # number of SQL commands
X-Sql-Time: 1.02      # duration in SQL in seconds
X-Queue-Time: 1.01    # time the request sat in queue (depends on NGINX)
```

To get queue time NGINX must provide: HTTP_X_REQUEST_START

We do not recommend you enable this without thinking, it exposes information
about what your page is doing, usually you would only enable this if you
intend to strip off the headers further down the stream in a proxy
2019-06-05 16:08:11 +10:00
Sam Saffron 6d8eb9c144 PERF: bypass slow locale lookups in various cases
Previously as soon as any override was defined we would regress to the slow
path for locale lookups. Additionally if `raise: true` was specified which
rails likes to add in views we would bypass the cache

The new design manages to use the fast path for many more cases
2019-06-05 14:30:25 +10:00
Sam Saffron 78509eacb7 DEV: lint file
followup to 9779307e
2019-06-05 11:32:47 +10:00
Bianca Nenciu b2b66d645b UX: Move archive button in topic controls dropdown (mobile view). (#7681) 2019-06-05 11:30:06 +10:00
Daniel Waterworth 3407445831 FIX: Prevent deadlock (#7691)
Before the locking here was added, replying to a post and liking a post
at roughly the same time could cause a deadlock.

Liking a post grabs an update lock on the post and then on the topic (to
update like counts).

We now lock the replied to post before getting the topic lock so that we
can update the replied to post later without causing a deadlock.
2019-06-05 11:29:27 +10:00
Maja Komel 9779307efc DEV: simpler spec for wayback machine crawler layout (#7696)
follow-up on 42809f4d
2019-06-05 11:24:52 +10:00
Neil Lalonde 1cf0b549ab FIX: don't send post edit notification when hidden tags are changed
Create a hidden revision so staff can see the changed, but don't send
notifications to non-staff.
2019-06-04 15:48:15 -04:00
Neil Lalonde dd1a034e7b Revert "FIX: don't send post edit notification when hidden tags are changed" 2019-06-04 15:48:15 -04:00
Gerhard Schlager 98a3e61a2d FIX: Remapping URLs didn't affect upload site settings 2019-06-04 18:37:10 +02:00
Joffrey JAFFEUX f03a547a89
REFACTOR: topic-entrance component (#7694) 2019-06-04 17:50:02 +02:00
Joffrey JAFFEUX 6de3824b46
REFACTOR: group model (#7692) 2019-06-04 17:41:46 +02:00
Joffrey JAFFEUX 68147cedd1
REFACTOR: username-validation mixin (#7693) 2019-06-04 17:41:33 +02:00
Joffrey JAFFEUX 7b19e63ce7
REFACTOR: badge model (#7690) 2019-06-04 17:12:02 +02:00
Kris 1bca6fdf51 UX: Z-index fix for preview on iOS 2019-06-04 11:08:49 -04:00
Arpit Jalan e7fe7010b8
FIX: use hijack for processing bulk invites (#7679)
FIX: do not store bulk invite CSV file on server
2019-06-04 20:19:46 +05:30
Neil Lalonde ecc9c76692
FEATURE: dynamically update the topic heat settings monthly (#7670)
The site settings beginning with "topic views heat" and "topic post like
heat" are set to defaults when installing Discourse, but there has not
been a process or guidance for updating these values based on
community activity.

This feature will update them once a month. The low, medium, and
high settings will be based on the minimums of the 45th, 25th, and
10th percentile topics respectively, so that 45% of topics will have
some "heat".

Disable automatic changes with the automatic_topic_heat_values setting.
2019-06-04 10:34:07 -04:00
Penar Musaraj e66024bd3b Update theme component URL 2019-06-04 10:04:27 -04:00
Joffrey JAFFEUX 4201329f1e
REFACTOR: topic-from-params route (#7689) 2019-06-04 15:51:22 +02:00
Gerhard Schlager f7a2648694 FEATURE: Migrate uploads to S3 during restore 2019-06-04 15:47:36 +02:00
Gerhard Schlager fb121815a5 DEV: Allow rebaking oncooked posts of single site 2019-06-04 15:47:36 +02:00
Joffrey JAFFEUX 4fe885dedf
FIX: corrects description as it's not unique (#7688) 2019-06-04 15:39:09 +02:00
Maja Komel 87bf0ec7ae
FIX: fix locale key 2019-06-04 13:35:17 +02:00
Régis Hanol 9756e35956 REVERT: FIX: handle clicks counters in quotes
Not quite a full revert of 7696b92c8c that isn't
actually required.
2019-06-04 11:59:44 +02:00
Guo Xiang Tan fcb7422213 DEV: Avoid hard-coding notification types integer in client side code.
Co-authored-by: Bianca Nenciu <nenciu.bianca@gmail.com>
2019-06-04 17:30:46 +08:00
David Taylor 0508546fd2 FIX: Accept github theme urls with a trailing slash 2019-06-04 10:28:36 +01:00
Joffrey JAFFEUX 9585a16264
FIX: ensures correct i18n key is used (#7686) 2019-06-04 11:22:44 +02:00
Joffrey JAFFEUX 4283281397
FIX: ensures we have data to compute average (#7685) 2019-06-04 11:21:55 +02:00
Joffrey JAFFEUX b79d02ff48
FEATURE: displays average for 2 columns tables which support average 2019-06-04 11:08:26 +02:00
Maja Komel c9a34aa10c FIX: add title attribute for notifications 2019-06-04 17:02:12 +08:00
David Taylor 6afd7f0eae FIX: Clean broken relations before adding javascript_caches foreign key 2019-06-04 10:01:20 +01:00
Guo Xiang Tan 6ad58913c8 DEV: Prefer `save!` over `save`. 2019-06-04 16:59:29 +08:00
Régis Hanol 33bc8c276d FIX: default top timeframe was overriding best_periods_for 2019-06-04 10:57:50 +02:00
Maja Komel 7da875f52a FIX: trigger user_updated webhook when avatar changes 2019-06-04 16:46:46 +08:00
Joffrey JAFFEUX 497a1d2d9f
FEATURE: uses native date picker on mobile (#7541) 2019-06-04 10:44:55 +02:00
Maja Komel 87d3b86484 FIX: better error message when user without permissions replies via email 2019-06-04 16:39:41 +08:00
Guo Xiang Tan 70b73c2159 DEV: Use proper heredoc name. 2019-06-04 16:31:18 +08:00
Joffrey JAFFEUX c4419b7369
REFACTOR: badge-selector component (#7683) 2019-06-04 10:30:56 +02:00
Bianca Nenciu 63e3d49508 DEV: Add test for poll plugin reduce_excerpt. 2019-06-04 16:30:15 +08:00
Maja Komel 2863e7c181 FIX: fix select badge as user title on badge page (#7682) 2019-06-04 18:19:30 +10:00
Guo Xiang Tan 5819e446dd Make lint happy. 2019-06-04 16:14:21 +08:00
Guo Xiang Tan 1991af2abb DEV: Switch `InlineUploads` to a regexp based implementation. 2019-06-04 15:54:25 +08:00
Guo Xiang Tan d93e5fb00d DEV: Class that converts MD with old attachment links to new MD. 2019-06-04 15:54:25 +08:00
Sam Saffron 22abad4151 PERF: stop reindexing and skipping deleted posts 2019-06-04 17:53:35 +10:00
Sam Saffron 74c4f926fc FIX: drop deleted posts from search index
This does two things

1. Our "index grace period" has been wound down to 1 day, there is no point
keeping a bloated index for a week, usually when people delete stuff they
mean for it to be removed

2. We were never dropping deleted posts from the index, only posts from
deleted topics

These changes speed up search a tiny bit and reduce background work.
2019-06-04 17:19:59 +10:00
Arpit Jalan af20d616de FEATURE: new rake task to invalidate broken images in post 2019-06-04 12:40:51 +05:30
Sam Saffron 6300d978e2 FIX: correctly escape regex url
duplicate link detection could fail in certain cases
2019-06-04 16:21:03 +10:00