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
Matt Van Horn
24c25895f0
remove unnecessary title quality tests from topic
2013-05-22 22:56:27 -07:00
Matt Van Horn
806255b3c4
refactor Topic validation
...
introduce a couple of custom validators
fix minor discrepancies in tests
copy I18n error message keys to default location
clean up validation invocation
move some responsibilities out of validator into class
2013-05-22 22:31:52 -07:00
Matt Van Horn
872995db57
refactor guardian class for clarity & correctness
...
introduce NullUser to avoid type-checking
DRY up code
reduce number of multiple returns
remove some redundant/impossible logic branches
add pending test for possible bug
add test & fix for ability to flag archived posts
add #secure_category? method to topic class
Fix bug that prevented flagging of archived topics
Rename NullUser to AnonymousUser
DRY up can_<action>? methods
Fix some ownership logic, and a test, for Guardian
2013-05-22 01:09:34 -07:00
Neil Lalonde
f3282e33a3
Add tabs to category create/edit modal. Categories can have a default auto-close setting that applies to all new topics created in the category. Add rspec-given and write some integration tests. Tests for topic auto-close with category default
2013-05-17 11:05:35 -04:00
Sam
e9ebadb414
Nuke message_bus_observer move to service class and classes
...
Secure all messages triggered by post creation and all user actions so they don't leak
(meaning, if you have a browser open and secure topics are created you will only get them if you are allowed to see them)
2013-05-16 15:03:16 +10:00
Sam
ef98b60184
disable observers in tests, enable as needed, tests are 20% faster
2013-05-14 11:59:55 +10:00
Robin Ward
be234ce9b9
You can now 'move' the first post of a topic to another topic as a merge. In that
...
case, the first post is cloned instead of being deleted from the original topic.
2013-05-13 14:07:31 -04:00
Neil Lalonde
9828c87525
Topic Auto-Close: admins and mods can set a topic to automatically close after a number of days
2013-05-13 12:53:52 -04:00
Robin Ward
cf01c98d81
Experimental: Interface to Move Posts to an Existing Topic
2013-05-10 14:55:51 -04:00
Neil Lalonde
dc07563c0d
Add unstarred_at column to topic_users so we can permanently track when topics are starred
2013-04-29 11:39:05 -04:00
Sam
8827dd3e42
speed up tests
2013-04-22 13:48:41 +10:00
Régis Hanol
c5cf8be864
auto replace rules in titles
2013-04-10 11:00:50 +02:00
Robin Ward
a0867bff24
Topic Statuses need to be updated by those who have access. I have self flaggelated
...
as punishment for checking in broken specs before running out earlier.
2013-03-29 02:38:54 -04:00
Robin Ward
473a64d39d
Add score, percent_rank to topics. Adds `HotTopic` model and consolidated job to calculate
...
hotness. Note: People on Heroku will have to update their jobs to the new structure
in Heroku.md
2013-03-28 15:39:54 -04:00
Robin Ward
36269cfbaa
Rename 'popular' to 'latest'. First stab at 'Hot' tab.
2013-03-27 16:21:23 -04:00
Karan Misra
5dfb04e4b3
Convert a lot of :a => b to a: b and bring peace to the world
2013-03-25 05:07:36 +05:30
Robin Ward
49c66037b1
Moved deleting tests to post_destroyer_spec
2013-03-19 14:15:08 -04:00
Robin Ward
59fc3bfac4
PostDestroyer to replace callbacks for destroying
2013-03-18 17:55:11 -04:00
Robin Ward
c1e40f5d19
Convert Post type constants to Enum
2013-03-18 17:55:05 -04:00
Robin Ward
b6224b014c
Move a bunch of callbacks into PostCreator
2013-03-18 13:56:26 -04:00
Robin Ward
ad082cea70
Big commit:
...
- Support for a popup that shows similar topics
- Cleaned up a lot of Javascript
- Cleaned up use of Promises
2013-03-15 14:35:33 -04:00
Robin Ward
1103dde5cd
Fix: When you split topics, featured users and like counts were incorrect.
2013-03-12 12:33:42 -04:00
Regis Hanol
2039c0f704
fix the specs errors due to a change to the min topic title's length
2013-03-11 14:51:24 +01:00
Robin Ward
f8d8272406
Cleaned up TopicUserSpec, introduces clearing of pinned topics
2013-03-07 12:19:25 -05:00
Robin Ward
30aae8e793
Topic was not sanitizing <b> and <img> tags from titles
2013-03-06 11:36:42 -05:00
Alexander
fd240c1967
RSS for topics in a category
...
Creates a new route for category RSS
2013-03-01 09:52:59 -08:00
Gosha Arinich
cafc75b238
remove trailing whitespaces ❤️
2013-02-26 07:31:35 +03:00
Robin Ward
836c3a7379
Support for Fancy topic titles
2013-02-19 16:14:04 -05:00
Robin Ward
37b0c168bf
Support non-english topic titles
2013-02-14 17:13:03 -05:00
Grant Ammons
a8c106bba6
use shared_examples_for versioning, for both posts and topics
2013-02-08 08:17:05 -05:00
Robin Ward
40da901e5d
Introduction of TextSentinel to enforce title and body quality.
2013-02-06 20:53:34 -05:00
Robin Ward
2d2b907d2c
Temporary Nuclear option on topic titles - disallow non ascii characters so we
...
can stay on top of the trolls. This is meant to be replaced soon with a more
permissive and safe method of sanitizing.
2013-02-06 15:47:36 -05:00
Robin Ward
21b5628528
Initial release of Discourse
2013-02-05 14:16:51 -05:00