Commit Graph

2956 Commits

Author SHA1 Message Date
Régis Hanol
1cde276656 FEATURE: ability to send emails to a group 2015-12-07 17:01:08 +01:00
Sam
8d49091572 PERF: stop running VACUUM FULL only run VACUUM 2015-12-07 20:14:26 +11:00
Arpit Jalan
dd8b773059 UX: use pastel blue background for topic education pop-ups 2015-12-04 09:19:55 +05:30
Arpit Jalan
f38abbe279 FIX: onebox links should respect nofollow settings 2015-12-04 01:59:12 +05:30
Sam
9899e8d4a5 FEATURE: First class messages to groups, you can select a group as a target of a message 2015-12-02 15:49:43 +11:00
Sam
6577f3c1ed Merge pull request #3909 from humzashah/reduced-time-operation
reused value of `Time.now` in a method
2015-12-02 09:01:22 +11:00
Syed Humza Shah
d0955e02d6 reused value of Time.now in a method
`Time.now` was being used to fetch the current time, twice in the
same line. This commit stores the time value in a variable and
reuses it instead of generating/fetching it for the second time.

Additionally, a guard clause in the same method is substituted by
an `if/else/end` block for clarity.
2015-12-01 21:06:37 +00:00
Andy Waite
3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Régis Hanol
5b9594277a skip most post validations for staged accounts 2015-12-01 10:40:23 +01:00
Sam
aa2f802247 PERF: DISCOURSE_NO_CONSTANTS removed
we minimize the amount of constants we decalre see: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821
2015-12-01 10:58:01 +11:00
Robin Ward
de88be2fbc Support for "Only show overridden" in site text customization 2015-11-30 15:25:08 -05:00
Régis Hanol
7c694139ec trust staged accounts when validating posts 2015-11-30 19:08:35 +01:00
Régis Hanol
dd28a3c63a add support for inline images in emails in 2015-11-30 18:33:24 +01:00
Sam
ad3dd161e7 FEATURE: first class group mentions built in
If you allow a group to be mentioned it can be mentioned with the @ symbol.

Keep in mind as a safety mechanism max_users_notified_per_group_mention is set to 100
2015-11-30 17:08:43 +11:00
Robin Ward
c4eee825de FIX: Missing site name key 2015-11-27 17:23:43 -05:00
Robin Ward
7181e3cb75 FIX: Missing new education keys 2015-11-27 17:00:43 -05:00
Régis Hanol
540933dce3 don't notify users about sequential replies in messages 2015-11-27 19:29:44 +01:00
Robin Ward
5e93140f85 FEATURE: Can override any translation via an admin interface 2015-11-27 11:35:19 -05:00
Sam
f74a6457ee FEATURE: allow CJK to be tokenized in non CJK sites.
Meaning a mixed English/Chinese site can still have a functioning search.
2015-11-27 16:35:27 +11:00
Régis Hanol
0d54c18c8b new hidden 'allow_staged_accounts' setting 2015-11-26 18:31:23 +01:00
Neil Lalonde
2561b5f304 Version bump to v1.5.0.beta6 2015-11-25 17:19:12 -05:00
Arpit Jalan
3eb0288adb UX: reviving old topic popup should not have red warning background 2015-11-25 16:31:17 +05:30
Sam
d41a8a21cc FIX: show letter avatars even if NGINX is not running in Dev mode 2015-11-25 14:42:46 +11:00
Robin Ward
434deb1bd3 SECURITY: Backported XSS fixes from Handlebars 2015-11-24 16:08:08 -05:00
Neil Lalonde
f4d44187c8 FIX: site_contact_user should default to system user, not first admin user 2015-11-24 14:37:41 -05:00
Robin Ward
d65ec1af2e Rename ninja_edit_window to editing_grace_period :'( 2015-11-24 14:28:42 -05:00
Arpit Jalan
db2799507b FIX: admin trust level user list URL should be consistent with new naming 2015-11-23 14:28:56 +05:30
Sam
5c899c765b Revert "Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS""
This reverts commit c21457d6a7.
2015-11-21 12:27:06 +11:00
Robin Ward
1506eba28d Support for overriding client side translation keys 2015-11-20 17:14:01 -05:00
Robin Ward
c21457d6a7 Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS"
This reverts commit c0b277d273.
2015-11-20 10:00:12 -05:00
Sam
c0b277d273 REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS
This change is discussed here: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821

Prior to this change we were not booting correctly with DISCOURSE_NO_CONSTANTS
2015-11-21 00:14:50 +11:00
Robin Ward
f5b34d5f53 FEATURE: Admin interface for editing email templates 2015-11-19 16:39:34 -05:00
Robin Ward
e168c5fde3 PERF: Much more performant, multisite aware I18n overrides 2015-11-19 16:36:59 -05:00
Robin Ward
7737ea89b1 FIX: Missing fallback logic 2015-11-19 12:35:51 -05:00
Sam
09bedfd4c0 Make DISCOURSE_NO_CONSTANTS work in anon for home page 2015-11-20 00:29:56 +11:00
Régis Hanol
31a54377be staged users automatically watches all topics they participates in 2015-11-18 22:24:46 +01:00
Robin Ward
7f4ca91e06 FIX: I18n overrides should be multisite aware 2015-11-18 16:05:53 -05:00
Robin Ward
2196160549 FIX: Allow emails to begin with a quote (but skip it!) 2015-11-18 15:23:10 -05:00
Régis Hanol
8ba5397f0d can't find staged users with search 2015-11-18 21:06:59 +01:00
Jeff Wong
cf86f27415 FEATURE: New setting to allow all caps posts
Adds a setting to ignore text_sentinel's check on all caps content.
2015-11-18 09:50:50 -08:00
Robin Ward
bb76c389fd Merge pull request #3817 from gschlager/locale-pluralization
FIX: Pluralizations in English locale files
2015-11-17 12:35:24 -05:00
Neil Lalonde
4423c6b9f9 Version bump to v1.5.0.beta5 2015-11-17 11:39:38 -05:00
uppfinnarn
ca8c5f7382 migrate_to_s3: check for missing local files
If an image is already on S3, but not available locally (eg. if they're already migrated), `path` is nil. This crashes the task, because File.exists?(nil) is not valid.
2015-11-16 11:39:40 +01:00
Robin Ward
810a069cfd FIX: Couldn't migrate database from nothing due to I18n
Since I18n has a DB backend now, I've introduced a helper we can use to
skip overrides in certain situations. Otherwise migration from empty
databases was broken.
2015-11-14 16:12:09 -05:00
Robin Ward
060ce9bf2a FEATURE: Overwrite server side I18n keys with API 2015-11-13 16:35:02 -05:00
Robin Ward
3720783c1b Refactor to our own Discourse I18n backend
This removes some monkey patches and makes testing easier.
It will also support database backed I18n changes.
2015-11-13 16:35:02 -05:00
Gerhard Schlager
6e33a21a7a FIX: Replace invalid pluralizations in locale files 2015-11-13 21:25:15 +01:00
Sam Saffron
6dd4bc7d57 FEATURE: support group owner, capable of controlling group membership
Group owners are regular users that can add or remove users to a group
The Admin UX allows admins to appoint group owners
The public group UX will display group owners first and unlock UI to
add and remove members

Group owners can only be appointed on non automatic groups
Group owners may not appoint another group owner
2015-11-10 00:56:57 +11:00
Robin Ward
8ba7c06b7d Merge pull request #3735 from riking/patch-4
FIX: Discourse.BaseUri should not default to /
2015-11-06 14:52:19 -05:00
Régis Hanol
fc27b7442f FIX: it should have been an array of arrays...:fired: 2015-11-06 15:42:16 +01:00
Régis Hanol
86f76e5b4d FIX: better plugin emojis API 2015-11-06 15:02:40 +01:00
Régis Hanol
13e96ffd3b FEATURE: add support for custom emojis via plugins 2015-11-05 17:25:26 +01:00
Régis Hanol
7e255a151b PERF: only use fulltext when searching for a user (I checked, it's enough) 2015-11-04 23:04:37 +01:00
Neil Lalonde
abeac7f681 two more places: make it possible for plugins to add methods to classes that don't follow naming conventions 2015-11-04 14:53:45 -05:00
Neil Lalonde
c1db9da45b Version bump to v1.5.0.beta4 2015-11-04 13:26:43 -05:00
Régis Hanol
e2121c2c2c FIX: add 'max-width' to images with auto width/height in emails 2015-11-04 12:38:39 +01:00
Gerhard Schlager
f85a311ae1 add missing dependency 2015-11-02 20:40:50 +01:00
Robin Ward
d00762dcd5 Merge pull request #3787 from gschlager/locale-keys
FIX: Some strings in locale files were not translatable
2015-11-02 13:40:22 -05:00
Sam
48ef609003 correct implementation add tests 2015-11-02 15:05:08 +11:00
Sam
3575012a47 correct implementation 2015-11-02 14:59:10 +11:00
Sam
fbb6eba252 Merge branch 'master' of github.com:discourse/discourse 2015-11-02 13:24:42 +11:00
Sam
eaae72c3e4 improve watching logic 2015-11-02 13:24:24 +11:00
Sam Saffron
606b10445e FEATURE: remove muted topics from suggested and latest 2015-11-02 09:20:22 +11:00
Régis Hanol
7fbf902d09 FIX: prevent cross-contamination of emojis in multisites 2015-10-30 23:26:34 +01:00
Arpit Jalan
9f8d6b6088 FIX: allow exisiting users to be invited to topic/message when enable_local_logins is disabled 2015-10-30 11:28:05 +05:30
Robin Ward
1f6e40eebe FIX: typo 2015-10-29 16:07:45 -04:00
Robin Ward
c68cbe700b FIX: Better link extraction than URL.regexp 2015-10-29 16:02:11 -04:00
Robin Ward
0b4c9005f9 FIX: Don't include name in hash when names are disabled.
This could break some SSO implementations due to honeypot
not being triggered.
2015-10-29 12:19:45 -04:00
Robin Ward
a9823ab59a FIX: Use a cookie to bypass the anon cache 2015-10-28 17:16:56 -04:00
Régis Hanol
bb79e6aff7 FEATURE: new hide_user_profiles_from_public site setting 2015-10-28 19:56:08 +01:00
Robin Ward
d9997a6b9e Add auto link support to the email formatter 2015-10-28 13:31:28 -04:00
Robin Ward
6b236d3c83 FEATURE: Bulk Unlisting of topics 2015-10-27 16:57:40 -04:00
Carson Reinke
df916e86b7 compact! only returns array if changes were made 2015-10-27 12:27:37 -04:00
Carson Reinke
6c172a30d3 #compact! can return nil if no changes were made 2015-10-27 12:14:18 -04:00
Robin Ward
2fdf8cba3d FIX: Support formatted > quotes in emails 2015-10-22 16:08:52 -04:00
Régis Hanol
6c29781687 FIX: this is making oneboxed images way too big (reverts 121426287) 2015-10-22 19:46:48 +02:00
Régis Hanol
515fc49727 FIX: replace polls with a link in emails 2015-10-22 19:10:07 +02:00
Robin Ward
57fc1e5e0c FIX: Don't run a FULL ANALYZE on first migration.
This seems to block databases unecessarily. We should only really be
vacuuming when there is a lot of deleted data to recover.
2015-10-22 12:34:09 -04:00
Arpit Jalan
1821ba8d93 optimize string replacment 2015-10-21 13:44:59 +05:30
Arpit Jalan
897563a309 FIX: List-ID should not contain space 2015-10-21 00:00:06 +05:30
Neil Lalonde
50d2ba5f8e Version bump to v1.5.0.beta3 2015-10-19 17:34:31 -04:00
Arpit Jalan
59a011e6a9 FIX: min_trust_to_create_topic affects private messages 2015-10-17 15:30:18 +05:30
Sam
805120fc95 FEATURE: add connnection reaping based on maximum age
This feature ensures connections to the db are always attempted to be closed
after 600 seconds of idle time.
2015-10-17 11:29:16 +11:00
Régis Hanol
5bea933370 fix build 2015-10-16 23:39:01 +02:00
Robin Ward
f155ff8270 FIX: Tests would fail if your test db's optimized image ids were high 2015-10-16 17:08:41 -04:00
Sam
606aeb9d55 improvements to importer
- improve perf of test for existing posts
- always use a system guardian when importing posts
- for lithuim importer requery raw (transform is not repeatable)
2015-10-16 10:41:21 +11:00
Régis Hanol
37c5909a31 FIX: use the first image in the first post in the topic as opengraph image
FEATURE: new 'default_opengraph_image_url' setting
2015-10-15 11:00:47 +02:00
Régis Hanol
73e345fe8f FIX: unescape emojis in digests 2015-10-15 09:59:29 +02:00
Sam Saffron
8a0a87812b FIX: navigating back to latest was not respecting pinned topics 2015-10-14 13:03:55 +11:00
Sam
a56e3ccea0 FIX: explicitly tracked topics will show up even if category is muted 2015-10-13 17:54:31 +11:00
Sam
fab51496cb correct full screen login feature 2015-10-13 13:11:49 +11:00
Sam
25db4cc4d9 added DONT_PRECOMPILE_CSS env var 2015-10-13 10:48:21 +11:00
Sam
42b72a9834 parallel is not really helping, need a diff approach. 2015-10-13 10:14:48 +11:00
Sam
5f62c592a4 FEATURE: CSS_COMPILE_THREADS env setting for compiling CSS concurrently 2015-10-12 17:31:37 +11:00
Sam
e29fe77b45 FEATURE: make trust level for message sending configurable
- add min_trust_to_send_messages site setting (default 1) to allow admins
 to configure when messages can be sent between members
2015-10-12 11:15:48 +11:00
Arpit Jalan
fa0f731427 FIX: do not show image as category description 2015-10-08 19:36:16 +11:00
Neil Lalonde
95e90ee9aa Version bump to v1.5.0.beta2 2015-10-02 11:08:09 -04:00
Régis Hanol
54d6d24cbf FIX: timing issue with edits and cook post processing 2015-09-29 18:51:26 +02:00
Sam
42925b46b8 FEATURE: allow DONT_MINIFY flag in production for assets:precompile 2015-09-29 11:54:16 +10:00
Sam
1061a9ed06 PERF: introduce full cache for site json when anon 2015-09-28 16:50:24 +10:00
Sam
da41b11309 FIX: mget not implemented correctly 2015-09-28 16:50:24 +10:00
Sam
47597ae6b3 PERF: better caching in topic view 2015-09-28 16:50:24 +10:00
Robin Ward
46bef4fad0 FIX: Allow mods/admins to search whispers 2015-09-25 11:43:04 -04:00
Robin Ward
c4b1b848bc More extension points for login buttons, used by OAuth2 plugin 2015-09-25 11:29:40 -04:00
Robin Ward
64598ceaba FIX: Replies to whispers *must* be whispers 2015-09-25 11:29:40 -04:00
Sam
57870b970d correct hack and move to oneboxer 2015-09-25 20:14:53 +10:00
Sam
fc2d61136d FEATURE: add context for cross topic links 2015-09-25 14:52:43 +10:00
Sam
e5234b38b8 FEATURE: add title expansion for off topic quotes 2015-09-25 13:35:14 +10:00
Robin Ward
0b4cb5cf0d Add better error messages for rate limits. 2015-09-24 13:52:46 -04:00
Robin Ward
3620c8c85e Move descriptions for rate limiting errors into the exception 2015-09-24 13:52:46 -04:00
Sam
ffb8cb8cac FEATURE: remove dependency of Redcarpet
PERF: cache fancy_title in topics table

New pure ruby implementation is far more flexible and easier to amend.
2015-09-24 13:37:53 +10:00
Régis Hanol
bda6b48ac1 new posts:fix_letter_avatars rake task 2015-09-23 22:44:53 +02:00
Gerhard Schlager
454a628d58 Add tests for I18n.exists? freedom patch 2015-09-23 20:41:51 +02:00
Régis Hanol
b01743620a fix deprecation 2015-09-23 11:16:17 +02:00
Sam
613761d1cd FEATURE: upgrade to Rails 4.2.4 2015-09-23 15:24:30 +10:00
Sam
a61765b9e4 PERF: improve perf of initial payload
also reduce  querying in topic query
2015-09-23 13:13:50 +10:00
Neil Lalonde
266f3591ce Version bump to v1.5.0.beta1 2015-09-22 15:16:01 -04:00
Robin Ward
79beb9f409 FIX: You could set reply_to_post_number when replying as a new topic 2015-09-22 13:32:19 -04:00
Robin Ward
9f89aefdd3 FIX: Don't update the last poster when a whisper is made 2015-09-22 12:23:37 -04:00
Sam
18a8853181 FIX: don't crash out searching for parent in oneboxer 2015-09-22 12:42:13 +10:00
Sam
9cad925c67 FIX: correct error message on precompile fail 2015-09-22 11:28:31 +10:00
Régis Hanol
4f7140fb32 FIX: properly filter whispers in user stream 2015-09-22 00:50:52 +02:00
Neil Lalonde
2ae032c9b0 FIX: categories page would sometimes show no topics, even if there are some visible topics to show 2015-09-21 18:13:14 -04:00
Régis Hanol
fe656fb04d FIX: select appropriate period when redirecting to top 2015-09-21 20:28:20 +02:00
Régis Hanol
a726f5efea FIX: ensure we always remove old backups 2015-09-21 10:52:03 +02:00
Sam
61ceaef4e5 FIX: allow ordering for term-less queries 2015-09-21 07:59:52 +10:00
Gerhard Schlager
825be30844 FIX: I18n.exists? should use locale fallbacks 2015-09-19 23:33:11 +02:00
Gerhard Schlager
49dc470a28 Add spec to check locale files for duplicate keys 2015-09-19 00:14:26 +02:00
Robin Ward
c1a9e32b48 FIX: When recovering a post, it should recreate user actions 2015-09-18 12:48:43 -04:00
Sam
681334701d FIX: Stop aggregating likes 2015-09-18 17:50:15 +10:00
Jeff Atwood
a58b6c5ac0 Merge pull request #3785 from riking/410
FIX: Return 410 Gone for deleted topics you could otherwise see
2015-09-18 00:21:27 -07:00
Sam
664e2209e5 FIX: order latest was broken 2015-09-18 17:16:53 +10:00
Kane York
c9e4745fe8 FIX: Return 410 Gone for deleted topics you could otherwise see 2015-09-18 00:14:43 -07:00
Sam
c1ecd6f4ce update annotations 2015-09-18 10:41:10 +10:00
Sam
ec4a1bb2c4 FIX: page tracking was not properly tracking transitions
PERF: move closure to self contained method so env is released earlier.
2015-09-17 11:06:33 +10:00
Robin Ward
23646494eb FIX: Don't return alternative post types in search queries 2015-09-16 14:51:20 -04:00
Neil Lalonde
9b543f65fb Version bump to v1.4.0.beta12 2015-09-16 11:32:31 -04:00
Régis Hanol
5277ec1ac0 FIX: ensure we have a bucket before enabling backups to S3 2015-09-16 15:55:26 +02:00
Sam
a7b34cd16b rename to badge, better more consistent name 2015-09-16 08:51:28 +10:00
Sam
6496895096 FEATURE: search for all posts by a group 2015-09-15 17:39:14 +10:00
Sam
17d999ab12 FEATURE: search for all posts of users that have a badge
with_badge:"badge name" will allow you to search only
posts of users with a particular badge
2015-09-15 17:22:08 +10:00
Neil Lalonde
db1820f39c make it possible for plugins to add methods to classes that don't follow naming conventions 2015-09-14 16:10:54 -04:00
Robin Ward
5af0f5f80e FEATURE: Whisper posts 2015-09-11 14:05:21 -04:00
Kane York
460243d7a3 FIX: Give 403 for deleted topics, +lots of tests 2015-09-11 08:29:44 -07:00
Régis Hanol
93f9dcfcec FIX: don't overwrite custom uploaded avatar when selecting gravatar
FIX: remove unecessary serialized fields
2015-09-11 15:10:56 +02:00
Arpit Jalan
d73d4d4769 FIX: UserNameSuggester should not suggest usernames with a sequence of 2 or more special chars 2015-09-11 16:53:26 +05:30
Kane York
aca70805f1 FIX: Discourse.BaseUri should not default to / 2015-09-10 17:34:08 -07:00
Régis Hanol
e43034f08f Revert "FEATURE: SVG letter avatars (based on @eviltrout's spike)"
This reverts commit cd77465788.
2015-09-11 00:23:52 +02:00
Régis Hanol
cd77465788 FEATURE: SVG letter avatars (based on @eviltrout's spike) 2015-09-11 00:11:48 +02:00
Sam
90ad943dd3 PERF: skip optimizing large letter avatar makes image bigger 2015-09-10 11:54:31 +10:00
Neil Lalonde
5b8917e578 Version bump to v1.4.0.beta11 2015-09-09 11:47:53 -04:00
Régis Hanol
3ee5cea9e2 fix the build 2015-09-09 15:34:53 +02:00
Régis Hanol
31e8309f05 FIX: ensure we never have a string when an enum is Fixnum - Take 2 2015-09-09 14:34:44 +02:00
Régis Hanol
9a999bfe84 FIX: ensure we never have a string when an enum is Fixnum 2015-09-09 12:59:49 +02:00
Régis Hanol
d5a2029026 FIX: category permissions weren't properly loaded when /categories is the homepage
FIX: don't scope to a specific category when creating a new topic from /categories
2015-09-07 18:52:53 +02:00
Régis Hanol
a501947d67 FEATURE: suppress categories from the homepage 2015-09-02 20:25:18 +02:00
Robin Ward
da25abfcc9 Merge pull request #3714 from riking/live-settings
FEATURE: Live-update site settings
2015-09-01 12:03:30 -04:00
Robin Ward
b41b176bc6 Support for value_list in site settings 2015-09-01 11:54:16 -04:00
Kane York
d4c68f2096 FEATURE: Live-update site settings 2015-08-31 10:40:50 -07:00
kerryliu
c85835afc3 FIX: rescale image during cooked_post_processor when only img height or width is specified 2015-08-29 15:23:25 -07:00
Robin Ward
42e510753d Support for Acceptance tests in plugins 2015-08-27 17:07:11 -04:00
Régis Hanol
96c23d51a2 FIX: don't break the message bus when restoring a backup 2015-08-27 20:02:13 +02:00
Régis Hanol
4ba89eec27 FIX: removing a default category wasn't working 2015-08-26 22:40:16 +02:00
Sam
1c6250bff8 FIX: if an enum is Fixnum do not allow strings to live in it 2015-08-26 16:39:09 +10:00
Neil Lalonde
3faeeca5c8 FIX: plugins that use models in their initialize section might fail when bootstrapping a new database 2015-08-25 16:38:25 -04:00
Neil Lalonde
fd28d4c978 Version bump to v1.4.0.beta10 2015-08-25 15:06:01 -04:00
Régis Hanol
e7e96eb8af fix the run-qunit scripts with backward compatible syntax 2015-08-25 17:37:36 +02:00
Guo Xiang Tan
6a31a5d52b Extract logic for censored-words so that it can be reused. 2015-08-25 22:26:01 +08:00
Régis Hanol
294669c856 FIX qunit test runner for phantomjs 2.0 2015-08-25 10:42:19 +02:00
Sam
f85b59b6d4 FIX: you could not manually trigger jobs via sidekiq ui 2015-08-24 16:44:41 +10:00
Sam
88a5a676a7 lower error level on onebox failures 2015-08-24 10:43:07 +10:00
Régis Hanol
bef80633b1 FEATURE: global admin override of most of the user preferences 2015-08-21 20:39:21 +02:00
Robin Ward
2b72bd3592 FIX: Missed incrementing idx 2015-08-21 11:39:40 -04:00
Robin Ward
37f2d8c73c Adds more helpers for plugin authors
`add_class_method` can be used to add a class method that only
executes when the plugin is enabled.

`add_model_callback` can be used to attach a callback to an
ActiveRecord model such as `before_save` that will only execute
when the plugin is enabled.
2015-08-21 11:29:45 -04:00
Kane York
2363897a25 FEATURE: Arbitrary validations for site settings 2015-08-20 18:27:19 -07:00
Sam
851c04478a Merge pull request #3682 from riking/dark-theme-fix
Dark theme fix, part 5
2015-08-21 10:32:10 +10:00
Kane York
7147c0e8af DEV: Replace sqrt() implementation with lib
Copied the needed functions out of https://github.com/terkel/mathsass
MIT license
2015-08-20 13:10:54 -07:00
Robin Ward
d1c69189f3 FEATURE: Can edit category/host relationships for embedding 2015-08-20 15:56:04 -04:00
Robin Ward
320e4a83ac FIX: Don't cache translations in development mode 2015-08-20 12:05:15 -04:00
Robin Ward
00c9469fba FIX: Don't include admin in non-admin and vice versa 2015-08-19 15:12:15 -04:00
Robin Ward
abd9b26642 Convert Badges / User Badges to ES6. 2015-08-19 12:09:10 -04:00
Sam
5f5d055a86 only if \u0000 is included for the perf 2015-08-19 12:32:45 +10:00
Sam
431def1f52 need to dup strings, some may be frozen 2015-08-19 12:32:45 +10:00
Sam
714f841f0a FIX: null bytes in user input should not cause post creation to fail 2015-08-19 12:15:38 +10:00
Sam
b38a1309f7 FIX: add more quoting to avoid invalid terms 2015-08-19 09:27:47 +10:00
Sam
27b1ec2917 FIX: incorrect emoji stripping logic 2015-08-19 09:12:08 +10:00
Régis Hanol
1b44924cb0 replace 'open_uri_redirections' gem with a single freedom_patches file 2015-08-18 14:56:36 +02:00
Robin Ward
7eb32be4de Add support for plugins to declare ES6 in the admin bundle 2015-08-17 15:03:55 -04:00
Régis Hanol
a3e76dc193 FIX: allow HTTP <-> HTTPS redirections when downloading images 2015-08-17 19:21:30 +02:00
Neil Lalonde
7581a7d869 move notification about low disk space into its own method 2015-08-14 17:46:15 -04:00
Régis Hanol
23a5c6444a FIX: move topic links and quoted posts extraction to the PostRevisor 2015-08-14 19:33:32 +02:00
Sam
23b8a408f7 FIX: serialize post processing
This avoids all sorts of nasty race conditions in job schedular
2015-08-14 13:05:13 +10:00
Sam
ad2de1804e Correct bad where clause when no category/user found 2015-08-14 11:53:16 +10:00
Sam
1f044350f6 stop running exec_sql through active record
this avoids double logging
2015-08-14 10:01:38 +10:00
Robin Ward
9b7c4023e8 Run eslint instead of jshint, remove rbx 2015-08-13 15:22:33 -04:00
Robin Ward
a89241f0b9 Don't include code in files for jshint anymore, eslint is run on command
line
2015-08-13 15:19:27 -04:00
Robin Ward
b0541500b4 FIX: eslint deprecations 2015-08-13 15:14:08 -04:00
Robin Ward
946e34f65c Use eslint in docker_test 2015-08-13 14:55:53 -04:00
Robin Ward
22844b9e46 Ember 1.12 support 2015-08-13 11:14:16 -04:00
Robin Ward
e2e3e7c0e0 Add ES6 support to more files 2015-08-13 10:49:08 -04:00
Neil Lalonde
766903c430 Version bump to v1.4.0.beta9 2015-08-13 10:41:03 -04:00
Sam
94a130a4e4 FIX: widen distributed mutex to avoid race condition 2015-08-13 18:53:30 +10:00
Sam
ecac786f86 FIX: remove invalid chars from ts_query helper 2015-08-13 17:55:10 +10:00
Régis Hanol
6669a2d94d FEATURE: per-topic unsubscribe option in emails 2015-08-12 23:00:16 +02:00
Régis Hanol
3f71fa15c9 reduce log level when we can't reach an image while cooking a post 2015-08-12 16:10:42 +02:00
Régis Hanol
ac8e90674b FIX: be more lenient when creating a post with a username that is no longer valid 2015-08-12 15:54:51 +02:00
Sam
4a75da4fa9 Extensibility: allow validation of topics to be extended
Add before_create_topic and after_validate_topic extensibility points
2015-08-11 15:46:32 +10:00
Sam
139314c213 FIX: search for 1.5 etc was broken
FEATURE: search by exact phrase

Use PG tokenizer to split up search phrase instead of relying on Ruby code
This produces much more accurate tokenization
2015-08-10 17:41:14 +10:00
Régis Hanol
485d9a5a52 Log an error when we can't reach an image to get its dimensions 2015-08-07 19:31:15 +02:00
Sam
fd63d89753 FEATURE: simpler definition of enum types 2015-08-07 11:41:48 +10:00
Neil Lalonde
75ee523a83 Version bump to v1.4.0.beta8 2015-08-06 15:32:51 -04:00
Sam
11d39345b3 FIX: always allow tl1 through for typing speed tests 2015-08-06 10:07:18 +10:00
Régis Hanol
82d743a052 FIX: don't use emojis as topic image 2015-08-05 12:57:31 +02:00
Sam
ca393bcc53 FEATURE: optional regex to be applied against first posts
for spam prevention you can add a regex to auto_block_first_post_regex
this will be applied against all first posts, if it matches post will go
into the approval queue and user will be blocked
2015-08-05 13:08:21 +10:00
Sam
6fdd53e3d6 FEATURE: auto block fast typers
if tl0 enter text too fast they get automatically blocked, configurable
2015-08-04 12:56:37 +10:00
Sam
01ad88f1ed FEATURE: min_first_post_typing_time
If a user spends less than 3 seconds typing
first post they will automatically enter the approval queue
2015-08-04 10:57:34 +10:00
Sam
7b8b96446e FEATURE: track statistics around post creation
- how long were people typing?
- how long was composer open?
- how many drafts were created?
- correct, draft saved to go away after you continue typing

store in Post.find(xyz).post_stat
2015-08-03 14:29:15 +10:00
Régis Hanol
d7aa4e81d6 revert 8f435fcbf6 2015-07-31 15:22:30 +02:00
Neil Lalonde
3cfb1dedf3 Version bump to v1.4.0.beta7 2015-07-30 15:46:13 -04:00
Robin Ward
3c742918fe FIX: Transpile unicode to fix opera issue 2015-07-30 15:16:07 -04:00
Robin Ward
9911e92e24 Merge pull request #3609 from riking/patch-7
FEATURE: Localization fallbacks
2015-07-30 10:44:29 -04:00
Sam
5a0dc12733 correct regression 2015-07-30 17:02:28 +10:00
Sam
3ccae5ed32 FIX: CDN paths not respected for background category images 2015-07-30 10:25:36 +10:00
Kane York
13d56eb989 FEATURE: Add CommentMigration for db column comments
For documenting the database (will be used in discourse-data-explorer)
2015-07-28 13:14:07 -07:00
Robin Ward
bb93a345eb UX: Use smaller messages for moderator actions. 2015-07-27 10:09:21 -04:00
Régis Hanol
2473a00b26 FIX: improve smoke tests 2015-07-27 11:07:42 +02:00
Sam
2876725e1b REFACTOR: remove hacky search from discovery 2015-07-27 16:47:06 +10:00
Sam
41ceff8430 UX: move search to its own route
previously search was bundled with discovery, something that makes stuff confusing internally
2015-07-27 16:47:06 +10:00
Régis Hanol
d2b59bf7f2 Merge pull request #3628 from tgxworld/emoji_in_user_stream
FEATURE: Display emojis in user stream.
2015-07-25 15:53:54 +02:00
Sam
7a5a195dc0 FIX: properly support HTTPS CDN on HTTP site
Previously we changed all CDN links to schemaless.

This is desirable for non HTTPS sites, to ease migration to HTTPS.
It is not desirable for secure sites.

Once site is secure or CDN is secure a rebake should be required
to move it back to non-secure.
2015-07-24 14:08:32 +10:00
Robin Ward
33a5fce124 Importer for mbox format 2015-07-23 18:37:40 -04:00
Guo Xiang Tan
7c1e16da54 FEATURE: Display emojis in user stream. 2015-07-23 23:50:01 +08:00
Sam
940be8261a FIX: going to PM directly results in 500 error
regressed 1 day ago.
2015-07-23 09:57:42 +10:00
Sam
3a54923116 FIX: permalink normalization not applied at constraint
implement permalink import for lithium
2015-07-22 13:40:45 +10:00
Sam
90b85e5b23 FIX: missing category from title in non-js view 2015-07-22 10:26:58 +10:00
Kane York
d6129001b9 FIX: Provide proper source map URLs with a CDN 2015-07-21 11:52:54 -07:00
Régis Hanol
0f480ac629 Merge pull request #3602 from lukegb/patch-1
Fix LocalStore.remove_file to not raise if source doesn't exist
2015-07-20 14:39:55 +02:00
Neil Lalonde
a23a04a1e5 Version bump to v1.4.0.beta6 2015-07-17 21:31:16 -04:00
Neil Lalonde
5e38512b1b Version bump to v1.4.0.beta5 2015-07-17 11:23:12 -04:00
Sam
5db345705b allow views to be specified in import mode 2015-07-16 16:11:20 +10:00
Sam
3a60d96573 Merge pull request #3611 from riking/change-owner
FIX: Allow to change ownership on deleted users' posts
2015-07-16 08:41:28 +10:00
Kane York
61ea8c6f72 FIX: Allow to change ownership on deleted users' posts 2015-07-15 15:29:35 -07:00
Régis Hanol
c17f8d1769 keep pretty_text in sync with client code 2015-07-16 00:01:00 +02:00
Kane York
e3b778a23a fixup: support merging N languages (js) 2015-07-15 14:30:16 -07:00
Kane York
15905be788 Disable in development (js) 2015-07-15 14:25:24 -07:00
Kane York
cb395662d0 Add JsLocaleHelper tests for i18n fallback 2015-07-15 14:23:41 -07:00
Kane York
ecfa17b5a7 FEATURE: Localization fallbacks (server-side)
The FallbackLocaleList object tells I18n::Backend::Fallbacks what order the
languages should be attempted in. Because of the translate_accelerator patch,
the SiteSetting.default_locale is *not* guaranteed to be fully loaded after the
server starts, so a call to ensure_loaded! is added after the locale is set for
the current user.

The declarations of config.i18n.fallbacks = true in the environment files were
actually garbage, because the I18n.default_locale was
SiteSetting.default_locale, so there was nothing to fall back to. *derp*
2015-07-15 10:17:36 -07:00
Kane York
728845d008 FEATURE: Localization fallbacks (client)
This patch sets I18n.defaultLocale in the Discourse.start() script block (it
was formerly always 'en') to SiteSetting.default_locale, and patches
translate() to perform fallback to defaultLocale followed by english.
Additionally, when enable_verbose_localization() is called, no fallbacks will
be performed.

It also memoizes the file loading operations in JsLocaleHelper and strips out
translations from the fallbacks that are also present in a prefered language,
to minimize file size.
2015-07-15 10:17:28 -07:00
Régis Hanol
b0802abae2 FIX: crop & optimize user background profile/card images 2015-07-15 17:15:43 +02:00
Robin Ward
8a9fa3e5bf FIX: Error reloading dev due to conditional require 2015-07-14 14:52:35 -04:00