Commit Graph

34290 Commits

Author SHA1 Message Date
39e0442de9 FIX: Various watched words improvements
- Client-side censoring fixed for non-chrome browsers. (Regular expression rewritten to avoid lookback)
- Regex generation is now done on the server, to reduce repeated logic, and make it easier to extend in plugins
- Censor tests are moved to ruby, to ensure everything works end-to-end
- If "watched words regular expressions" is enabled, warn the admin when the generated regex is invalid
2019-08-02 15:29:12 +01:00
4c6a0313f2 FEATURE: improve stats provided by rake db:stats
New stats include index size and sort by index + table size

Eg:

```
table_name                  | row_estimate | table_size | index_size | total_size
--------------------------------------------------------------------------
topic_views                 | 18260776     | 796 MB     | 2015 MB    | 2811 MB
post_timings                | 15813837     | 668 MB     | 1153 MB    | 1821 MB
posts                       | 386890       | 1532 MB    | 215 MB     | 1747 MB
post_search_data            | 317575       | 580 MB     | 162 MB     | 742 MB
incoming_emails             | 34412        | 734 MB     | 7160 kB    | 741 MB
incoming_links              | 5169302      | 306 MB     | 377 MB     | 683 MB
email_logs                  | 5            | 32 kB      | 418 MB     | 418 MB
topic_users                 | 2410166      | 217 MB     | 155 MB     | 372 MB
user_actions                | 1361253      | 101 MB     | 266 MB     | 366 MB
...

```
2019-08-02 17:25:42 +10:00
e2df331fdb DEV: default to test env when running d/rspec (#7962) 2019-08-02 16:40:46 +10:00
3e456d5c0b FIX: don't include multisite upload path to source URL if already exist. 2019-08-02 07:57:27 +05:30
a1fc35fdf7 FIX: make uploads recovery compatible with multisite. 2019-08-02 07:08:21 +05:30
50db6a1d62 FIX: Correctly update replies when first post gets moved 2019-08-01 22:07:21 +02:00
4113b57cfe REFACTOR: Use less queries when moving posts 2019-08-01 22:04:45 +02:00
f57fdee2f6 FIX: Modal onClose was being called repeatedly
This happened because the modal controller was not clearing the `name`
attribute, which is used for looking up the controller to call `onClose`
on.

Every page navigation would call the method over and over, breaking
state in odd ways.
2019-08-01 15:42:43 -04:00
e44d56e4d2 DEV: raise error only when 'STOP_ON_ERROR' env variable is available. 2019-08-01 23:54:06 +05:30
6f367dde26 UX: Rename "Keep Post" to "Keep Post Hidden" when hidden (#7767)
* UX: Rename "Keep Post" to "Keep Post Hidden" when hidden

This is based on this feedback:
https://meta.discourse.org/t/category-group-review-moderation/116478/19

When a post is hidden this makes the operation much more clear.

* REFACTOR: Better support for aliases for actions

Allow calls on alias actions and delegate to the original one.
This is less code but also simplifies tests where the action might
be "agree_and_keep" or "agree_and_keep_hidden" which are the same.
2019-08-01 11:23:23 -04:00
23dd50316c FIX: Rollback when multisite tests raise exceptions 2019-08-01 15:26:06 +01:00
b76a1df27d FIX: Don't reuse redis connections in different threads in tests
Redis connections aren't threadsafe since they have state, (watched
keys).
2019-08-01 09:51:22 +01:00
7bd93eba3e FIX: Gravatar uploads being dependent on authorized_extensions. 2019-08-01 16:24:09 +08:00
20bc4a38a5 FIX: DistributedMutex (#7953) 2019-08-01 09:12:05 +01:00
3b575b82f3 Fix the build.
1481ea640c2bdcb6e6ef5d5cf991ef9195f7151f broke it.
2019-08-01 15:23:50 +08:00
Joe
8531056ad5 UX: style fixes for admin digest email preview page (#7959)
* code formatting: Nothing changed in this commit except code formatting

* adds classes to digest refresh button

* adds margins to digest refresh button

* removes line break tags and uses CSS margins instead
2019-08-01 14:37:42 +08:00
1481ea640c FIX: better error message on username update from Admin user page. 2019-08-01 10:23:42 +05:30
a1a61fcd2d DEV: Use File#file? in posts:missing_uploads rake task. 2019-08-01 10:59:34 +08:00
fe645c0f0b UX: remove confusing border on ignored users list 2019-07-31 17:39:28 +02:00
19dda59932 FIX: add back verbose option to DbHelper.remap 2019-07-31 17:30:08 +02:00
d1434b6600 DEV: Remove unused imports 2019-07-31 16:21:02 +01:00
49bce0ccdb DEV: Remove unused action from user preferences controller
This is no longer used following d8ff94ecaac9f00aa109bec340130aa06001ae19
2019-07-31 16:15:23 +01:00
dcb47d902b REFACTOR: Rename SiteSetting.disable_edit_notifications to disable_system_edit_notifications (#7958)
* REFACTOR: Rename SiteSetting.disable_edit_notifications to disable_system_edit_notifications

- The older name could cause some confusion because the setting does not disable all edit notifications, only system ones.

* FIX: Add frozen_string_literal: true in the migration

* DEV: Deprecate 'disable_edit_notifications'
2019-07-31 20:20:41 +05:30
a49b7bb84a FIX: Prevent user-notifications-dropdown from causing unintended changes
It was setting the `onClose` property of the singleton modal controller, which would then persist until the next full page reload
2019-07-31 15:38:47 +01:00
13e74151a9 FEATURE: list category moderators on the about page (#7916)
https://meta.discourse.org/t/category-group-review-moderation/116478?u=osama
2019-07-31 16:46:58 +03:00
8a6ee09008 FIX: Post#each_upload_url yields incorrect path to block when CDN is enabled. 2019-07-31 10:00:52 +08:00
43365a2bf1 Fix some broken styles 2019-07-30 16:46:20 -04:00
9656a21fdb FEATURE: customization of html emails (#7934)
This feature adds the ability to customize the HTML part of all emails using a custom HTML template and optionally some CSS to style it. The CSS will be parsed and converted into inline styles because CSS is poorly supported by email clients. When writing the custom HTML and CSS, be aware of what email clients support. Keep customizations very simple.

Customizations can be added and edited in Admin > Customize > Email Style.

Since the summary email is already heavily styled, there is a setting to disable custom styles for summary emails called "apply custom styles to digest" found in Admin > Settings > Email.

As part of this work, RTL locales are now rendered correctly for all emails.
2019-07-30 15:05:08 -04:00
Joe
340173eb12 DEV: consistent theme lookup in application / crawler / no-ember views (#7955)
* removes `raw` helpers

* include theme footer in the crawler view

* include theme body tag content in no-ember pages
2019-07-30 19:00:46 +02:00
a1fb718340 DEV: Tweak plugin rake task console message
Show "Allowing write to all repos!" message only once.
2019-07-30 09:53:56 -04:00
7ebb3503a3 UX: Make profile views consistent with other elements (#7956)
* UX: Make profile views consistent with other elements

* Spaces not tabs
2019-07-30 09:23:37 -04:00
1267185a07 DEV: Remove unused option.
Follow up to 18ed03e044611c29b006011e1b729f5a9d43163a.
2019-07-30 21:12:13 +08:00
18ed03e044 Clarify how to start a tutorial
https://meta.discourse.org/t/does-the-advanced-user-tutorial-still-exist/123661/14
2019-07-30 21:10:22 +08:00
4d1d8b40db DEV: Re-enable Rubocop checks for plugins
But exclude gems in plugins.
2019-07-30 09:09:00 -04:00
03d28342f8 FIX: Make initializer work on first db:migrate
Follow-up to 94607a2f
2019-07-30 10:23:24 +02:00
94607a2f6b FEATURE: Generate new VAPID keys when base_url changes
This is useful when a backup is restored on a staging site or in a development environment. It also deletes all existing push subscriptions because they get invalid when the keys change.
2019-07-30 10:08:24 +02:00
Joe
a0df4c3757 UX: prevents cooked dates from wrapping (#7954) 2019-07-30 14:04:30 +08:00
5feb342914 Revert "FEATURE: add Noindex to robots.txt for disallowed routes"
This reverts commit d84256a876a9fa4fc7bcb4b8ac8c5865f8c10701.

This is not supported by Google and causes robots.txt to be flagged as
invalid

Removing Noindex
2019-07-30 11:33:38 +10:00
b5705348b3 FIX: Correctly identify Chromium-based Edge
Chromium-based Edge browsers has only "Edg" in user agent string.
2019-07-29 16:51:08 -04:00
70bd8e2dad UX: Show a warning when admin clicks save without adding group when changing category permissions (#7947)
* UX: Show a warning when admin clicks save without adding group when changing category permissions

* Use div rather than pseudo element

* Don't pass controller to component

* Use observer instead of a delay

* Refactor

* Rename to validator

* validator is much better than saveValidator
2019-07-29 21:53:31 +03:00
89fce2ce71 DEV: remove duplicate Remap class and use DbHelper.remap instead
Follow-up to 9cd3f96dee96d3fdda99174077fb79c1d6f26ea3
2019-07-29 18:43:40 +02:00
36cb5f3038 UX: Increase contrast of pinned/tracking reason text, improve layout 2019-07-29 11:54:23 -04:00
ef46231214 Fix the build. 2019-07-29 20:02:18 +08:00
faea594436 DEV: Extract common regexps for multisite. 2019-07-29 19:01:36 +08:00
d4acd35466 FEATURE: Sync unread state live to topic lists (#7933) 2019-07-29 10:28:42 +01:00
933d279811 FIX: Support multi-file stylesheets in theme components (#7950) 2019-07-29 10:28:24 +01:00
8a64b0c8e8 Revert "DEV: Remove unused kwarg and properly check for local missing uploads."
This reverts commit 97769f3d0226642905cf0605aeb0bc69d7295ca1.

The code is confusing but this change is quite risky. Defer for now
until we can look at it properly.
2019-07-29 14:35:34 +08:00
97769f3d02 DEV: Remove unused kwarg and properly check for local missing uploads. 2019-07-29 14:21:06 +08:00
49d9557337 Revert commit that was pushed by mistake.
This reverts commit c7516c42e9aaedd0f82bd2393e8037031997a39c.
2019-07-29 11:04:38 +08:00
e9dc48ccae DEV: Fix multisite support for posts:missing_uploads. 2019-07-29 10:56:11 +08:00