Commit Graph

83 Commits

Author SHA1 Message Date
Sam 3f07c1d0a1 Backend support for group invites 2014-05-09 18:22:35 +10:00
Louis Rose 1574485443 Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
2014-05-06 14:41:59 +01:00
Benjamin Kampmann e502122c51 Add Custom Fields on Topics 2014-04-29 19:26:42 +02:00
Régis Hanol 454f11e597 FEATURE: new title_sanitize site setting 2014-04-18 21:01:21 +02:00
Régis Hanol b014d66b65 Merge pull request #2277 from vikhyat/fix-title-html
Fix HTML tags in topic titles
2014-04-18 11:37:33 +02:00
Vikhyat Korrapati 25a080a8e1 Fix HTML tags in topic titles.
We no longer sanitize titles before saving to the database since it
would cause problems like HTML entities showing up when you try to edit
a topic title. It isn't even really necessary since we only render
fancy_title directly and never title.

The escaping logic used here is the same that is used both in lodash and
onebox. See:

1. https://github.com/discourse/onebox/pull/190/files
2. https://github.com/lodash/lodash/blob/2.4.1/dist/lodash.compat.js#L6194
2014-04-18 10:47:00 +05:30
Robin Ward 64faee0935 Break down new topic counts by category if a digest contains many. 2014-04-17 16:42:40 -04:00
Robin Ward 0d238db43c Exclude category definition topics from similar search 2014-04-14 15:21:05 -04:00
Robin Ward f5c7ccb4e6 New field: Whether or not to include an expandable first post for
embedded content.
2014-04-02 10:26:46 -04:00
Sam 3f0964bf60 BUGFIX: spec would blow up when DST kicked in 2014-03-10 10:12:09 +11:00
Régis Hanol f618278b42 make sure topic specs aren't DST sensitive 2014-03-07 11:38:24 +01:00
Sam b19400726f BUGFIX/FEATURE: store topic changes in post revisions
History + edit notifications for title and category changes
2014-03-07 19:00:36 +11:00
Régis Hanol ac99947979 BUGFIX: topic specs were dependent on Time.now
which would fail when DST was around
2014-03-06 12:44:52 +01:00
Sam 9551f4aeea PERF: calculate scores for topics/posts faster
Only look at topics that changed in last day for 15 minuted schedule
Do a full recalc weekly, just in case
2014-02-27 11:45:40 +11:00
Neil Lalonde 52580f09af Rename favorite to starred everywhere 2014-01-10 14:54:19 -05:00
Régis Hanol 06dd7ffe3c better revision history 2013-12-12 03:41:34 +01:00
Neil Lalonde 9a24d2651d Allow category to auto-close topics in X hours instead of days. FIX: the system message that says a topic was automatically closed was only counting in days. 2013-12-06 16:39:35 -05:00
Neil Lalonde abed146cc7 FIX: Category description topics shouldn't auto-close 2013-12-04 10:31:25 -05:00
Neil Lalonde a9ab98ef9e Auto-close time can be entered in 3 ways, so a topic can close at any time 2013-11-27 09:52:35 -05:00
Robin Ward 4ce81e1b01 Rename "Best Of" to "Summary" 2013-11-18 12:48:26 -05:00
Sam d1d661f6e1 add logic that auto closes any topics that missed the queued job (due to redis flush or whatever) 2013-11-11 10:52:44 +11:00
Robin Ward 948a545cb1 Category descriptions should not appear in digests 2013-11-06 15:05:06 -05:00
Manoj 9650dbb97c Refactor topics controller
Refactor: 1) TopicsController to reduce code climate complexity.
2) Topic model, addressed comments

fix typo
2013-10-28 11:42:07 +05:30
Sam 4929c5db71 FIX: when allow_uncategorized_topics was false, PMs can not be created 2013-10-25 09:33:39 +11:00
Sam 666264879c change it so all topics MUST include a category, we store a special uncategorized category to compensate
this cleans up a bunch of internals and removes some settings
2013-10-24 12:08:02 +11:00
Sam ad2ed5fe51 rate limits for topics and posts on first day
max_topics_in_first_day and max_replies_in_first_day
2013-10-10 10:32:03 +11:00
Neil Lalonde bccb37b6f3 When creating a topic, don't select a category by default when allow_uncategorized_topics is false. Also, added category validation on the server to enforce allow_uncategorized_topics. 2013-10-08 14:41:20 -04:00
Robin Ward 7d9a84b496 New User Education goes through a server side ComposerMessages check. Composer message for users
who don't have avatars.
2013-09-13 12:23:53 -04:00
Sam 2ce4468aa5 rename system_username to site_contact_username , system_user is a special user with -1 id that is only used for certain admin tasks
for example system_user will autoclose stuff if needed, it will delete stubs and be the target for flag pms
2013-09-06 17:28:37 +10:00
Robin Ward fe3a69c271 Private message emails now include the history 2013-08-07 13:03:45 -04:00
Stephan Kaag f99acebdaa Rails 4 updates 2013-07-24 21:09:18 +02:00
Sam 38b8e9b1b4 get rake autospec working in rails 4 2013-07-24 11:49:26 +10:00
Sam 58e7c3e1f3 push some work out of AR callbacks into PostCreator, add a couple of helpers for post and topic creation in test
fix it so the auto_track false marks topics as new
2013-07-22 15:07:20 +10:00
Sam 81616a46ba db consistency check for mismatching topic_ids in user_actions
fix up post mover so it remaps user actions as well
move specs for post mover into post_mover_spec
2013-07-17 16:40:56 +10:00
Sam ecf17cfebb work in progress, add fidelity to category group permissions (full, create posts, readonly) 2013-07-16 15:46:11 +10:00
Robin Ward b7327942af Add `deleted_by` to `Trashable` tables 2013-07-09 15:46:36 -04:00
Neil Lalonde 806bd98f99 Update category's topic_count immediately when trashing or recovering a topic; this ensures that a category can be deleted without waiting for the category_stats job to run. 2013-07-08 15:23:20 -04:00
Robin Ward 05fe33111e FIX: Moving a post should also update its TopicLink records 2013-07-02 16:42:25 -04:00
Robin Ward 023d18cab2 FIX: Admins should be able to post short titles. This is especially important for when syndicating
a blog via the wordpress plugin into Discourse.
2013-06-29 17:57:10 -04:00
Sam 80c42753e1 fix up find as you type for the invite into PM function
allow mods to remove users from a PM
2013-06-18 17:17:01 +10:00
Robin Ward 3c7eb3a4e8 FIX: null dates crashed the client app. `last_posted_at` was not updating properly on split topic. 2013-06-17 13:02:50 -04:00
Robin Ward 77b218a142 FIX: Do not suggest similar topics from secure categories you can't see. 2013-06-12 13:45:11 -04:00
Sam 9aa2cc2262 extra spec 2013-06-08 23:56:40 +10:00
Sam 1756f713d6 SECURITY HOLE, upgrade right away if you are using Secure Groups. 2013-06-08 23:52:06 +10:00
Neil Lalonde a151bfc7ec Store when a topic was first set to auto-close and report that amount of time when it closes. And do some refactoring. 2013-06-06 17:04:21 -04:00
Neil Lalonde 2465c9c724 Add min_private_message_title_length site setting so private messages can have short titles 2013-06-04 17:59:23 -04:00
Robin Ward d23ef1d090 FIX: You could update a topic to have a title that's too short if the TextCleaner
removed extra characters. Additionally, updating the title will not return an error
message to the client app if the operation fails (rather than failing silently.)
2013-05-31 15:24:13 -04:00
DI2uNk 24e32092e7 Refactored two class methods into scopes (to achieve a better 'rails way')
Also added some tests to the methods
2013-05-30 21:21:31 +02:00
Chris Hunt be234a2bc7 Add test to verify autoclose moderator post 2013-05-27 18:02:15 -07:00
Chris Hunt 1ba18318ac Add test to verify posts are moved in transaction 2013-05-25 17:44:32 -07:00