Commit Graph

32567 Commits

Author SHA1 Message Date
b3dcaacdf4 Update Rails to 5.2.3. 2019-04-20 10:49:54 +09:00
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
151da50e7c FIX: prevents exception when the node doesnt exist anymore (#7408) 2019-04-19 18:27:23 +02:00
3dae12dec1 reduce unlinked count from missing post upload count 2019-04-19 21:53:00 +05:30
4fcefc3615 add unlinked missing post upload count in stat 2019-04-19 20:39:21 +05:30
57d1dea8a2 FEATURE: Let staff add custom post notices. (#7377) 2019-04-19 17:53:58 +03:00
ba6369edc5 Add more missing upload stats in rake task 2019-04-19 20:14:40 +05:30
48cedf3ebe fix: retrieve posts in order by id.
so we can find starting and ending id of the batch.
2019-04-19 18:30:59 +05:30
ce8d30f667 PERF: use 'delete_all' method instead of 'destroy_all' 2019-04-19 18:00:01 +05:30
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
7e3628d11f Added test-prof as a dependency (#7395)
test-prof is a collection of tools for analyzing test-suite performance.
2019-04-19 10:52:31 +02:00
19905e587b Revert "UX: Show user card on load (#7380)" (#7403)
This reverts commit 66789d73c942aeceef515bf6b9cad5768777035c.
2019-04-19 10:45:25 +02:00
66789d73c9 UX: Show user card on load (#7380) 2019-04-19 09:20:03 +02:00
1d0816b2cf UX: Changed error draft status to icon (#7369) 2019-04-19 09:18:01 +02:00
cbe7166d87 UX: Move total user count 2019-04-19 00:35:50 -04:00
99efd12376 FIX: Url in Russian translation 2019-04-18 17:10:58 -04:00
f62828f14d Break long group names, don't truncate 2019-04-18 14:10:52 -04:00
85d8d5d092 FIX: Lint 2019-04-18 13:49:28 -04:00
8e77b4d58e FIX: Replace references to flags in the header with review 2019-04-18 13:25:23 -04:00
a19d89364f DEV: fix and skip upload_controller test
This test of `prevent_anons_from_downloading_files` was testing an image instead of an attachment and it was testing the wrong upload URL. I fixed the test, but with `config.public_file_server.enabled = true` on the test environment, this will always fail, as preventing anonymous file downloads depends on nginx. So, I marked the test as skipped, for now.
2019-04-18 12:58:39 -04:00
7826acc4a7 DEV: Replace site_setting_saved DiscourseEvent with site_setting_changed (#7401)
* DEV: Replace site_setting_saved DiscourseEvent with site_setting_changed

site_setting_saved is confusing for a few reasons:
- It is attached to the after_save of the ActiveRecord model. This is confusing because it only works 'properly' with the db_provider
- It passes the activerecord model as a parameter, which is confusing because you get access to the 'database' version of the setting, rather than the ruby setting. For example, booleans appear as 'y' or 'n' strings.
- When the event is called, the local process cache has not yet been updated. So if you call SiteSetting.setting_name inside the event handler, you will receive the old site setting value

I have deprecated that event, and added a new site_setting_changed event. It passes three parameters:
- Setting name (symbol)
- Old value (in ruby format)
- New value (in ruby format)

It is triggered after the setting has been persisted, and the local process cache has been updated.

This commit also includes a test case which describes the confusing behavior. This can be removed once site_setting_saved is removed.
2019-04-18 16:48:01 +01:00
6e46197bc8 FIX: Disable webhooks on 410 and 404 HTTP responses (#7392)
FIX: Disable webhooks on 410 and 404 HTTP responses (#7392)
2019-04-18 12:36:37 +01:00
7d301cd0dd DEV: Remove empty DiscourseEvent handler
Logic was moved in ba6d4b2
2019-04-18 12:25:28 +01:00
a80c1f4011 Skip test for now
The test works when it is run alone, but somehow leaks state

Will work on improving it next week
2019-04-18 17:55:16 +10:00
7068b58e85 PERF: flush topic timings less frequently
This is a first step of a performance optimisation, more will follow

Previously we did not properly account for previously read topics while
"rushing" marking times on posts.

The new mechanism now avoids "rushing" sending timings to server if all
the posts were read.

Also to alleviate some server load we only "ping" the server with old timings
once a minute (it used to be every 20 seconds)
2019-04-18 17:31:08 +10:00
1f17d52f55 UX: new layout for groups page, allow changes to automatic group bio (#7350) 2019-04-17 22:44:30 -04:00
bf712a8598 break long words/urls to prevent overflow 2019-04-17 21:11:02 -04:00
2b8487b0ea Removed "shoulda" gem in favor of "shoulda-matchers" and update (#7387)
* Update shoulda gem

* Remove shoulda gem in favor of shoulda-matchers only
2019-04-18 07:41:37 +10:00
ec4cd09210 UX: Improve review queue layout on small screens 2019-04-17 16:17:54 -04:00
cd2e93b598 FIX: Show when a post has been deleted in the flag review queue 2019-04-17 16:14:36 -04:00
Joe
ee808dc682 UX: replace lightbox loading text with spinner (#7393) 2019-04-17 10:24:03 -07:00
7cd621778d FEATURE: Native app banner improvements
This commit adds some improvements to native app banners for iOS and Android

- iOS and Android now have separate settings for native app banners

- app banners will now only show for users on TL1 and up

- app ids are now in a hidden site setting to allow sites to switch to their own app, if desired

- iOS only: the site URL is passed to the app arguments
2019-04-17 12:25:13 -04:00
14f9d40e48 FEATURE: Clarify Reviewable User Actions
"Approve" is now "Approve User" and "Delete" is a dropdown with a choice
that allows you to block.
2019-04-17 11:44:17 -04:00
12a5c69abd FEATURE: Allow users to tone down digest emails (#7353)
* FEATURE: Allow user to tone down email digest insteand of only unsubscribing

* Reordered options and select the next slowest frequency by default
2019-04-17 12:14:40 -03:00
c687e2b921 FIX: Use saved_change_to_value? in site_setting_saved event
Since Rails 5.2, the behavior of `attribute_changed?` inside `after_save` callbacks has changed, so we need to use `saved_change_to_attribute` instead. The site setting local_process_provider in test mode was covering up the issue.
2019-04-17 10:07:00 -04:00
a58091e352 Mobile alert padding too broad 2019-04-17 09:37:42 -04:00
02a9429c38 REFACTOR: Quick refactor of the webhook event emitter job (#7385)
* REFACTOR: Quick refactor of the webhook event emitter job
2019-04-17 10:03:23 +01:00
16bfc29164 Move the trend icons on the admin dashboard inside the span (#7367)
so that it will have the tooltip as well
2019-04-17 18:11:01 +10:00
5c795bc480 FIX: prevent anonymous users from changing their email/username/name (#7311) 2019-04-17 18:05:02 +10:00
a8f410a9c5 FEATURE: Create new helper method 'Discourse.stats' (#7388) 2019-04-17 12:45:04 +05:30
ba6d4b2a8d FIX: Better handling for toggling must_approve_users
If you turn it on now, default all users to approved since they were
previously. Also support approving a user that doesn't have a reviewable
record (it will be created first.)

This also includes a refactor to move class method calls to
`DiscourseEvent` into an initializer. Otherwise the load order of
classes makes a difference in the test environment and some settings
might be triggered and others not, randomly.
2019-04-16 15:56:35 -04:00
cec0b580e6 UX: detect DiscourseHub user agent in recently used devices 2019-04-16 13:50:47 -04:00
d2ea602bdd DEV: Mark flaky tests as pending until we fix them. (#7386) 2019-04-16 13:35:54 -03:00
72a7f9af87 FIX: Add the last missing translation for push notifications
and sync the message for "custom" with the message of regular notifications
2019-04-16 18:04:46 +02:00
7e8579b8aa UX: Add translations for lightbox 2019-04-16 17:03:01 +02:00
5ec19987b4 FIX: attempts to fix a regression making touchs on emojis less reliable (#7383) 2019-04-16 12:31:33 +02:00
3aca070311 FIX: Restoring backup shouldn't change disable_emails from "yes" to "non-staff" 2019-04-16 11:48:07 +02:00
ac27bdce14 DEV: Prevent warnings in specs 2019-04-16 11:41:27 +02:00
35a866fe22 FIX: Do not strip email lines having lists. 2019-04-16 11:39:35 +03:00