Commit Graph

34111 Commits

Author SHA1 Message Date
Sam Saffron 333b5a19b2 FIX: do not include uncategorized_category_id in `topic_create_allowed` if posting in uncategorized is disabled
Previously users were still allowed to create topic via API even if
uncategorized was disabled.

Not 100% happy with all this special casing, but I guess we have to do
something.

This also splits up a mega spec now that we have fab! into a more easy to
understand structure (I hope)
2019-06-26 17:41:07 +10:00
Neil Lalonde 7e884cce6b Update translations 2019-06-25 10:57:18 -04:00
Bianca Nenciu 557805249d
FIX: Ensure topic exists before making a banner. (#7781) 2019-06-25 13:49:29 +03:00
Bianca Nenciu 3fd7cf9038 Revert "PERF: Use Oj for serializing JSON. (#7780)"
This commit broke discourse-prometheus.

This reverts commit b4df8c5466.
2019-06-25 11:13:27 +03:00
Guo Xiang Tan d21594f4f7 Revert changes added by mistake in 2b19e2acc8. 2019-06-25 15:25:12 +08:00
Guo Xiang Tan 2b19e2acc8 Fix typo in a0aeabbb94. 2019-06-25 15:18:57 +08:00
Osama Sayegh 2eece2c41b
UX: add shortcut for deferring topics (#7798) 2019-06-25 07:20:55 +03:00
Guo Xiang Tan a0aeabbb94 DEV: Safer replacement for old scheme uploads for `posts:missing_uploads`. 2019-06-25 11:34:26 +08:00
David Taylor afb5ec811d FIX: Don't use DistributedCache to store redis readonly state
This can cause unbound CPU usage in some cases, and excessive logging in other cases. This commit moves redis readonly information into the local process, but maintains the DistributedCache for postgres readonly state.
2019-06-25 11:20:34 +08:00
Sam Saffron f3e4e6941c DEV: Correct batch setting of categories
followup to #bc03c509

There were 2 problems

1. VALUES was not properly getting multiple results ... we need (1),(2),(3)
not (1,2,3)

2. changes was mistakenly lazy evaluated eg `changed ||=` which meant some
queries were not running
2019-06-25 13:05:43 +10:00
Daniel Waterworth bc03c509ab FIX: CategoryUser#batch_set (#7787)
* Remove unused method

* Prefabricate user in category_user_spec.rb

* FIX: Remove notification_level from category_users unique indexes

* FIX: CategoryUser#batch_set wasn't updating pre-existing records

* Improve tests for CategoryUser#batch_set

* FIX: changed was being reported incorrectly

* DEV: Rewrote query to do a bulk insert

* DEV: remove unnecessary parentheses
2019-06-25 12:13:27 +10:00
Jeff Wong 6de254f642 FIX: iterate when clearing watched words cache 2019-06-24 17:17:56 -07:00
Vinoth Kannan b1ca64487a FIX: multisite upload urls must have either db name or the word 'short-url'. 2019-06-25 01:19:58 +05:30
Kris 9e54e0141e FIX: mobile overflow for tall fixed modals 2019-06-24 12:24:13 -04:00
Bianca Nenciu b4df8c5466
PERF: Use Oj for serializing JSON. (#7780) 2019-06-24 18:32:00 +03:00
Joffrey JAFFEUX f4e354afff FIX: ensures url to full reviewable conversation works on subfolder 2019-06-24 11:31:07 -04:00
Joffrey JAFFEUX c1ca942a77
REFACTOR: removes self pattern from safari-hacks lib (#7795) 2019-06-24 11:12:06 +02:00
Joffrey JAFFEUX e064db35d9
REFACTOR: removes self pattern from eyeline lib (#7796) 2019-06-24 10:58:59 +02:00
Joffrey JAFFEUX cea3a027f3
FIX: category-chooser search should be scoped to category (#7794) 2019-06-24 10:45:30 +02:00
Guo Xiang Tan f3c13d80c9 DEV: Don't copy file when trying to recover missing uploads. 2019-06-24 16:32:59 +08:00
Joffrey JAFFEUX 7cabc47945
UX: improves change-timestamp modal datepicker (#7771) 2019-06-24 10:24:54 +02:00
Guo Xiang Tan 2cc5561504 DEV: Correct description in `posts:missing_uploads` rake task. 2019-06-24 14:57:43 +08:00
Sam Saffron 4c89f7f881 DEV: bump version on mini_scheduler
This corrects a catastrophic state that can ensue if redis becomes readonly

It also adds support for multiple queues and minor cleanup
2019-06-24 16:56:16 +10:00
Dan Ungureanu ee8669d778
FIX: Ensure :after_auth event is triggered. (#7791) 2019-06-21 21:57:49 +03:00
Robin Ward 02f6db4e59 FIX: Back button shenanigans when redirecting from `index` routes
This is a problem that has long plagued Discourse. The root issue here
is that we have to implement our own link click handler, because
Discourse allows users to create HTML blobs of content with links, and
when those links are clicked they must be handled by the Ember router.

This always involved a certain amount of use of private Ember APIs which
of course evolved over time.

The API has more or less stabilized in the last two years, however we
have hacks in our URLs to handle a dynamic root path, depending on how
forums have set up their filters and in what order.

This patch adds a special case for the root path so we needn't update
the URL ourselves otherwise, which preserves the back button on index
routes. The update call would otherwise insert an extra history event if
a route redirected on transition, breaking the back button.
2019-06-21 14:42:01 -04:00
Penar Musaraj e51de4cc25
FEATURE: Add endpoint to individually update a theme setting (#7789)
- also adds a new staff action type called "change theme setting" for easier logging of staff changes to theme settings
2019-06-21 13:49:14 -04:00
Arpit Jalan 2738d11f60
UX: show like icon on archived posts (#7775) 2019-06-21 20:47:32 +05:30
Daniel Waterworth feda7e1ddf DEV: Remove logging when redis is terminated
This hasn't proved useful, just noisy.
2019-06-21 10:31:48 +01:00
Joffrey JAFFEUX 1cbe2dd2ce
DEV: adds polyfill to fully support DOMTokenList in IE (#7765) 2019-06-21 09:59:28 +02:00
Guo Xiang Tan 7c86f16aa3 FIX: Support carriage return in `InlineUploads`.
Follow up to 8deaef3872.
2019-06-21 14:07:06 +08:00
Guo Xiang Tan 8deaef3872 FIX: Don't replace img tags within anchor tags with markdown format.
Follow up to 9a25b0d614.
2019-06-21 12:32:02 +08:00
Penar Musaraj f51f37eddf FEATURE: apply a small penalty to closed topics when searching (#7782) 2019-06-21 12:03:45 +10:00
Guo Xiang Tan 9a25b0d614 FIX: Edge case with anchor tag in `InlineUploads`. 2019-06-21 09:55:56 +08:00
Sam Saffron 5bc92296be DEV: lint a bunch of files we missed 2019-06-21 11:33:41 +10:00
Sam Saffron fc84e23b71 DEV: allow bin/turbo_tests to run tests without params 2019-06-21 11:33:22 +10:00
Sam Saffron fd5c2fbac7 DEV: make parallel spec optional with autospec
At least temporarily while we refine the system keep parallel as optional
2019-06-21 11:00:28 +10:00
Daniel Waterworth e18ce56f4b DEV: Add a new way to run specs in parallel with better output (#7778)
* DEV: Add a new way to run specs in parallel with better output

This commit:

 1. adds a new executable, `bin/interleaved_rspec` which works much like
    `rspec`, but runs the tests in parallel.

 2. adds a rake task, `rake interleaved:spec` which runs the whole test
    suite.

 3. makes autospec use this new wrapper by default. You can disable this
    by running `PARALLEL_SPEC=0 rake autospec`.

It works much like the `parallel_tests` gem (and relies on it), but
makes each subprocess use a machine-readable formatter and parses this
output in order to provide a better overall summary.

(It's called interleaved, because parallel was taken and naming is
hard).

* Make popen3 invocation safer

* Use FileUtils instead of shelling out

* DRY up reporter

* Moved summary logic into Reporter

* s/interleaved/turbo/g

* Move Reporter into its own file

* Moved run into its own class

* Moved Runner into its own file

* Move JsonRowsFormatter under TurboTests

* Join on threads at the end

* Acted on feedback from eviltrout
2019-06-21 10:59:01 +10:00
Vinoth Kannan 9f0574dcfd SPEC: Update webhook event attributes even when an error raised
1e3cb7575d
2019-06-21 00:45:35 +05:30
Robin Ward fc026e12a5 FIX: Some toolbar operations weren't triggering the `change` event
This would mean that some simple edits to queued posts did not get
saved.
2019-06-20 13:35:12 -04:00
Robin Ward 0d84c5b894 FIX: If a user deletes a hidden post, it should not lose history 2019-06-20 12:38:16 -04:00
Penar Musaraj 0e26c57afa FIX: Do not refresh all settings on save for all settings, limit to only a few
- Followup to 0e303c7f5d

- Automatically reloads site settings after saving only for the logo, logo_small and large_icon settings.
2019-06-20 10:57:31 -04:00
Vinoth Kannan 56b7777705 FIX: 'status' param change not filtering the topics in tag route.
Use existing 'filterQueryParams' helper method to set 'queryParams' value for tag route.
2019-06-20 17:27:32 +05:30
Joffrey JAFFEUX cd6a130cd0
FEATURE: adds early support for new emojis (#7785)
🟫 🟪 🟦 🟩 🟨 🟧 🟥 🟤 🟣 🟢 🟡 🟠 🪒 🪑 🩺 🩹 🩸 🦯 🪓 🪔 🪕 🩰 🩳 :briefs: 🩱 🥻 🦺 🤿 🛺 🦼 🦽 🛕 :maté: 🧃 🦪 🧈 🧆 🧅 🧄 🦨 🦮 🧑‍🤝‍🧑 👩‍🦽 👨‍🦽 👩‍🦼 👨‍🦼 👩‍🦯 👨‍🦯 :woman_kneeling: :man_kneeling: :man_standing: :woman_standing: 🧏‍♀️ 🧏‍♂️ :hear_with_hearing_aid: 🦿 🦾 🤍 🤎
2019-06-20 11:30:09 +02:00
Guo Xiang Tan 53efb7bd24 FIX: BBcode edge case for `InlineUploads`. 2019-06-20 11:47:51 +08:00
Penar Musaraj f096c994de FIX: use correct name for selectable_avatars_enabled site setting 2019-06-19 13:18:16 -04:00
Guo Xiang Tan 34f382b758 FIX: `InlineUploads` should replace attachment links with markdown text. 2019-06-19 11:15:02 +08:00
Guo Xiang Tan 73a45048a0 FIX: `Upload#short_url` generates incorrect URL when extension is `nil`. 2019-06-19 09:10:50 +08:00
Robin Ward e8b9f38374 FIX: Don't allow users to edit topic information when the OP is locked
see:
https://meta.discourse.org/t/user-able-to-edit-title-of-locked-post/104826
2019-06-18 14:22:38 -04:00
Robin Ward 6fec4982d9 FIX: Couldn't modify a widget that wasn't in the registry 2019-06-18 12:28:18 -04:00
Arpit Jalan 6d30be1f94 Improve XenForo import script.
- ensure only active, unbanned users are imported.
- ensure only visible threads/posts are imported.
2019-06-18 15:52:34 +05:30