Commit Graph

19529 Commits

Author SHA1 Message Date
Rafael dos Santos Silva
1fdeec564b PERF: Move where clause up to speed up CalculateAvgTime daily job (#7462)
Cuts down affected posts earlier in the query, so the generated plan
deals with less rows, and runs faster.

https://meta.discourse.org/t/post-calculate-avg-time-taking-up-a-long-time/49750/13?u=falco
2019-04-30 13:34:46 +10:00
Guo Xiang Tan
dca7f8ecf2 FIX: Loading more broken on groups page.
Regressed in 1f17d52f55.
2019-04-30 10:35:17 +08:00
Neil Lalonde
a00354f11f Prettier site-settings/group-list.js.es6 2019-04-29 16:26:13 -04:00
Neil Lalonde
1ba72ccab8 DEV: add site setting type group_list for a list of groups
Add a js test
2019-04-29 16:15:22 -04:00
Rafael dos Santos Silva
526e76ced2 FIX: Use PostgreSQL 'ON CONFLICT' to deal with race condition
On busy sites, concurrent requests to insert into post_timings can
occur, which was dealt with using Ruby exceptions.

This moves the handling to PostgreSQL which makes it a bit faster,
and prevents a spam of ERROR in the database logs.
2019-04-29 16:34:42 -03:00
Penar Musaraj
bfadb1fabc FIX: use more specific target for ".tag-box"
This avoids tags named "box" from receiving styling aimed at this specific element on the tag list page.
2019-04-29 13:55:40 -04:00
Neil Lalonde
f8f7091e57 FIX: staff-only tags visible on /tags page when restricted to a category
If a tag group is set to only be visible to staff, and is restricted
to a category that is visible by everyone, the tags in the group were
being shown on the /tags page. They weren't visible anywhere else.
This commit fixes it so they don't show on the /tags page.
2019-04-29 12:38:28 -04:00
Penar Musaraj
b75720d911 FIX: skip click-tracking for mentions 2019-04-29 12:05:47 -04:00
Gerhard Schlager
876c4f20b3 FIX: Remove duplicate Emoji names from blurb
The blurb contained the value of the alt and title attribute of Emojis. Both values are always the same.
2019-04-29 17:26:39 +02:00
Gerhard Schlager
71d19f6e1f FIX: Reduce mentions in blurbs to @username or @groupname
The link to the user profile or group is useless and the URL encoded username or group name looks awful for Unicode names
2019-04-29 17:26:39 +02:00
Joffrey JAFFEUX
5768011cad
FIX: prevents exception in the composer with regexp flags 2019-04-29 16:58:17 +02:00
Penar Musaraj
629ae7a5b7 FIX: Revert tracking links in quotes 2019-04-29 10:30:04 -04:00
Bianca Nenciu
aef35faefc FIX: Open links in external tabs. (#7444) 2019-04-29 10:27:29 -04:00
Penar Musaraj
ca9fd95a08 FIX: Respect "open external links in new window" in quotes and edit history 2019-04-29 10:13:53 -04:00
Gerhard Schlager
7a27c93c03 FIX: URL encode username and first letter in avatar URL
And it adds specs as a follow-up to aadb7da7
2019-04-29 15:08:14 +02:00
Joffrey JAFFEUX
286f2abc65
FIX: prevents exception when clicking directly on site text 2019-04-29 12:07:30 +02:00
Sam Saffron
ac3dab93f5 DEV: lint the files 2019-04-29 17:40:53 +10:00
Sam Saffron
45285f1477 DEV: remove update_attributes which is deprecated in Rails 6
See: https://github.com/rails/rails/pull/31998

update_attributes is a relic of the past, it should no longer be used.
2019-04-29 17:32:25 +10:00
Saurabh Patel
1b1cfd4507 add no_subcategories query param in url only if its true (#7439) 2019-04-29 15:10:59 +08:00
Joffrey JAFFEUX
fe86941cb6 FIX: prevents exception when search q params is a hash (#7437)
* FIX: prevents exception when searh q params is a hash

* raise when invalid format
2019-04-29 15:09:25 +08:00
Tim Lange
574f39f9d0 FIX: Fixed uploadPlaceholder regex failing on not escaped characters (#7442) 2019-04-29 12:32:48 +10:00
Joffrey JAFFEUX
de79313f62
FIX: ensures file extension doesnt have a leading point (#7449) 2019-04-27 14:00:51 +02:00
Joffrey JAFFEUX
6952510fc4
FIX: restores skipHeader computed property 2019-04-26 23:43:49 +02:00
Tim Lange
1486328756 UX: Changed post stream placeholder to animation (#7434) 2019-04-26 17:29:48 +01:00
Sam Saffron
8fc2b0124f PERF: destroy users in batches of 50 users
This speeds up the process as we no longer need to commit a transaction
per user deleted
2019-04-26 22:51:33 +10:00
Sam Saffron
b8c65cc6cf PERF: add index on user auth tokens (for user lookups)
This speeds up user destroy cause we cascade looking up all the tokens
for a user
2019-04-26 22:38:54 +10:00
Sam Saffron
378fe1c1cf PERF: allow looking up incoming email by user_id
This speeds up the ability to remove users from the system
2019-04-26 22:33:01 +10:00
Sam Saffron
26b4dbde41 PERF: use delete_all to remove notifications and topic_users
Previously we used destroy here which could be extremely expensive
2019-04-26 22:26:48 +10:00
Joffrey JAFFEUX
bcca2b5d73
FEATURE: initial implementation of generic filters for reports 2019-04-26 12:17:10 +02:00
Maja Komel
4b455e741e DEV: Ember 3.8.0
Co-Authored-By: majakomel <maja.komel@gmail.com>
2019-04-26 12:16:21 +02:00
Sam Saffron
c617e512ad annotate new indexes 2019-04-26 18:23:27 +10:00
Sam Saffron
c009a6ae36 PERF: speed up user deletion logic
Previously any user deletion would scan a very large number of tables

This avoids scans on 6 tables/indexes on delete
2019-04-26 18:11:39 +10:00
Vinoth Kannan
be0ae2e487 FIX: plain text table detection should work even if html content not found. 2019-04-26 11:16:41 +05:30
Vinoth Kannan
dc2ee78f7a UX: Only do plain text table detection in outside code if HTML pasting enabled
Co-authored-by: Tim Lange <tim.lange@titanhq.de>
PR: https://github.com/discourse/discourse/pull/7436
2019-04-26 09:20:21 +05:30
Guo Xiang Tan
abecb3aea8 Update annotations. 2019-04-26 10:36:21 +08:00
romanrizzi
34b772575e FIX: Return 'failed' attribute when catching an ajax error and the attribute is present 2019-04-25 14:49:52 -03:00
Guo Xiang Tan
761e1e25f7 Remove tables incorrectly excluded in Upload.migrate_to_new_scheme.
Follow up to 4a03b21f80.
2019-04-25 20:27:52 +08:00
Joffrey JAFFEUX
7cbc4c1e46
FIX: uses no tags label for tag-drop header (#7438) 2019-04-25 13:16:06 +02:00
Gerhard Schlager
6d77156a94 FIX: Don't try to delete inactive admins 2019-04-25 11:59:50 +02:00
Maja Komel
422237391e FIX: fix notifications for flag PMs and show topics with moderator posts in inbox (#7331)
Some old moderator posts that were not correctly processed before this change and 993d8f34 are not listed under /u/username/messages
2019-04-25 11:15:13 +02:00
Maja Komel
996e5e5dfa FIX: category list order using category featured topics (#7283) 2019-04-25 11:07:19 +02:00
Joffrey JAFFEUX
e386fa7674
FIX: ensures we have touches when starting pan event (#7435) 2019-04-25 10:36:41 +02:00
Tarek Khalil
d8ff94ecaa
FEATURE: Ignoring users from the preferences page in a cleaner way (#7289)
* FEATURE: Ignoring users from the preferences page in a cleaner way
2019-04-25 09:26:49 +01:00
Vinoth Kannan
84cfe30c1f Use update_all instead of save to select and update particular columns
9ec6ef85b6
2019-04-25 11:56:57 +05:30
Guo Xiang Tan
4a03b21f80 Exclude large tables when remapping in Upload.migrate_to_new_scheme.
Those tables do not carry any information about uploads.
2019-04-25 11:55:48 +08:00
Gerhard Schlager
aadb7da7d3 FIX: Use first grapheme cluster for letter avatar 2019-04-24 23:20:46 +02:00
Gerhard Schlager
03f9564804 FIX: Handle missing letter avatar 2019-04-24 23:20:46 +02:00
Dan Ungureanu
3aa143a52c
SECURITY: Fix tab nabbing. 2019-04-25 00:11:28 +03:00
Kris
505c5addca Allow signup form width to increase when no external logins are present 2019-04-24 13:08:39 -04:00
Penar Musaraj
6df8c4b8f0 FIX: Fall back to large logo on mobile no_ember pages 2019-04-24 11:39:11 -04:00
Tarek Khalil
e4d8d80cf8
FIX: Make sure we hide the first post in a topic by an ignored user (#7428) 2019-04-24 16:00:20 +01:00
Penar Musaraj
1a8c6577e0 FIX: refactor padding when exiting composer
Previously, when existing composer, the `#main-outlet` element padding was set to zero. This inline style would override any CSS set for that element, causing issues with the mobile footer nav.

The fix removes the inline padding style instead of setting it to zero. It also uses integers for the set values, and removes a duplicate style.
2019-04-24 10:26:35 -04:00
Tarek Khalil
ad61d87ffb
FIX: Do not replace text of collapsed ignore posts (#7422) 2019-04-24 13:54:46 +01:00
Penar Musaraj
a452933071 FIX: disable input zoom on search in iOS 2019-04-24 08:41:20 -04:00
Guo Xiang Tan
be88ac8b7e Additional old Upload#url format for Upload.migrate_to_new_scheme. 2019-04-24 18:19:25 +08:00
Guo Xiang Tan
9ec6ef85b6 Don't validate post when saving in Upload.migrate_to_new_scheme. 2019-04-24 17:17:31 +08:00
Guo Xiang Tan
3c9495b989 DEV: Put a mutex around Upload.migrate_to_new_scheme.
This ensures that only one migration is running at any given point in
time across the instances.
2019-04-24 17:07:10 +08:00
Guo Xiang Tan
55f406bb79 Follow up to 845b68f9ab. 2019-04-24 16:57:45 +08:00
Tim Lange
104a9e79f9 UX: User card loading (#7404) 2019-04-24 11:55:09 +03:00
Joffrey JAFFEUX
7334362b77
FEATURE: generic theme component bbcode wrapper (#7400)
Usage:

```
[wrap=name foo=bar]
hello world
[/wrap]
```
2019-04-24 10:37:34 +02:00
Guo Xiang Tan
845b68f9ab Update possible upload url format for Upload.migrate_to_new_scheme. 2019-04-24 16:26:54 +08:00
Guo Xiang Tan
c811e59898 Avoid hardcoding db name in Upload.migrate_to_new_scheme. 2019-04-24 15:25:24 +08:00
Chris Butler
8673bd832a FEATURE: use failed_to_login for SSO error (#7394)
The error displayed when logging into suspended accounts via SSO never includes
the suspension reason, unlike non-SSO logins. By re-using the failed_to_login
method when generating the error message for SSO we can ensure the message is
consistent between the SSO and non-SSO paths.
2019-04-24 16:38:56 +10:00
Saurabh Patel
d4bec7fdfb use description_text instead of description to show correct sanitized description (#7420) 2019-04-24 16:33:58 +10:00
Guo Xiang Tan
e351b2ee26 Revert "FEATURE: stop running migrate to new scheme once done"
This reverts commit 2e346e6ea2.

Super seeded by 573ddcbbd0.
2019-04-24 14:03:31 +08:00
Guo Xiang Tan
573ddcbbd0 Disable migrate_to_new_scheme once there is nothing to migrate. 2019-04-24 14:00:00 +08:00
Sam Saffron
2e346e6ea2 FEATURE: stop running migrate to new scheme once done
This setting will automatically disable itself when there are no longer any
problem uploads
2019-04-24 14:32:39 +10:00
Guo Xiang Tan
3094a603b7 Follow up to 149411ec90. 2019-04-24 12:20:53 +08:00
Guo Xiang Tan
149411ec90 PERF: Speed up Upload.migrate_to_new_scheme by limiting remap scope.
Doing a `LIKE` on `Post#raw` and `Post#cooked` takes forever on large
sites.
2019-04-24 11:56:48 +08:00
Guo Xiang Tan
a8baa6d9e7 FIX: Old Upload#url scheme support for Upload.get_from_url.
This is for backwards compatibility purposes. Even if `Upload#url` has a
format that we don't recognize, we should still return the upload object
as long as the upload record is present.
2019-04-24 10:15:47 +08:00
Robin Ward
646cdfa449 FIX: Approved posts were not enqueueing alerts 2019-04-23 17:30:12 -04:00
Bianca Nenciu
b9339e15a1 FIX: Do not track a elements with no href. 2019-04-23 23:13:23 +03:00
Bianca Nenciu
b81d169e2a FIX: Do not track user mentions. 2019-04-23 23:08:00 +03:00
Robin Ward
fca3f53e9c FIX: Safer scoring with concurrency 2019-04-23 15:53:37 -04:00
Robin Ward
70097966ed FIX: Don't add the reviewable score twice 2019-04-23 15:46:18 -04:00
Robin Ward
6f56fba016 UX: Update post actions to "Approve Post" and "Reject Post"
This should be more clear.
2019-04-23 12:19:11 -04:00
Joffrey JAFFEUX
c99faa6b25
FIX: improves locale support in tag-drop (#7418) 2019-04-23 17:53:59 +02:00
Joffrey JAFFEUX
d4e788c136
FIX: improves share/invite behavior on mobile and especially iOS (#7416) 2019-04-23 17:07:31 +02:00
Tarek Khalil
dc60128355
FIX: Hide ignoring users in preference for users with TL less than a member (#7415)
* FIX: Hide ignoring users in preference for users with TL less than a member
2019-04-23 14:47:37 +01:00
David Taylor
a2ddb6cf2d DEV: Increase max length of theme_field name column
Now that we have custom SCSS files with arbitrary names, it's easy to exceed 30 characters
2019-04-23 12:34:32 +01:00
Gerhard Schlager
a7bc1ecbae FEATURE: Add support for Unicode usernames and group names
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2019-04-23 13:00:27 +02:00
Guo Xiang Tan
d07605d885 DEV: Fix failing spec. 2019-04-23 18:25:28 +08:00
Bianca Nenciu
1867f2dda0
FEATURE: Always track clicks using AJAX. (#7373) 2019-04-23 12:41:36 +03:00
Dan Ungureanu
c048b71b29
UX: Replace staff notice icon with user-shield. 2019-04-23 10:37:33 +03:00
Guo Xiang Tan
87cca0fb80 FIX: Return the right response code for invalid theme id. 2019-04-23 14:57:14 +08:00
Guo Xiang Tan
3ac18b92b3 UX: Editing theme name stays active when switching themes.
* Also fix length of input field.
2019-04-23 14:57:14 +08:00
Saurabh Patel
3658be42f5 FIX: remove like_count and <hr> tag from post crawler layout (#7413)
* show likes value in crawler view if count is > 0

* remove <hr> since horizontal line is already provided by css - this removes one of 2 horizontal lines in post crawler view
2019-04-23 15:35:57 +10:00
Michał Frąckiewicz
8f7cfc29db FIX: Detect SNS notifications for SES correctly (#7284)
* Fix handling SNS notifications for AWS SES

This fixes detection of email bounce by:
- removing hard requirement for email ID, ID in webhook msg never equals this in email_log
- gets bounce_score from user stats instead of nonexistent field in webhook msg

* Remove empty line

* Prettify access to EmailLog for parsing SNS notification

Co-Authored-By: SystemZ <SystemZ@users.noreply.github.com>
2019-04-23 13:03:31 +10:00
Bianca Nenciu
58fe45ffd9 UX: Do not close login modal and search menu on outside mouse up event. (#7366) 2019-04-23 13:01:44 +10:00
Bianca Nenciu
9050b1bf5a FIX: Add unique index on group_requests(group_id, user_id). (#7399) 2019-04-23 12:51:30 +10:00
Robin Ward
a8e3ac90a0 FIX: nil error in list, incorrect count in reviewable pending 2019-04-22 12:18:57 -04:00
Saurabh Patel
3f9ec197e7 FIX: use last_activity_date instead of created_at for crawler view 2019-04-22 11:38:48 -04:00
Arpit Jalan
a63ef4cfc8
FEATURE: better wizard privacy controls (#7391) 2019-04-22 19:47:29 +05:30
Dan Ungureanu
f112f279ae
UX: Reorder post admin actions for greater consistency. 2019-04-22 10:57:14 +03:00
Guo Xiang Tan
caeb035b61 FIX: Automatic scrolling in PM not working.
See https://stackoverflow.com/questions/18779708/scrolltop-with-animate-not-working
2019-04-22 10:52:46 +08:00
Guo Xiang Tan
0210b0aabc REFACTOR: Prefer accessing instance variables directly.
* No need to wrap instance variables with another method to read it.
* Remove memoization that wasn't really memozing anything.
2019-04-20 09:39:25 +08:00
Joffrey JAFFEUX
151da50e7c
FIX: prevents exception when the node doesnt exist anymore (#7408) 2019-04-19 18:27:23 +02:00
Dan Ungureanu
57d1dea8a2
FEATURE: Let staff add custom post notices. (#7377) 2019-04-19 17:53:58 +03:00
Vinoth Kannan
5de483a1b9 PERF: Very post upload's existence by preloaded upload sha1s array 2019-04-19 17:27:16 +05:30
Joe
b150a57383
UX: don't clip staff shield in user cards (#7398) 2019-04-19 01:53:23 -07:00