Commit Graph

102 Commits

Author SHA1 Message Date
Robin Ward
bbd79aafd1 Revert "Replaced delegator methods with Forwardable def_delegator in Topic"
This reverts commit 3ed037940f.
2013-08-29 11:45:27 -04:00
Einar Jonsson
3ed037940f Replaced delegator methods with Forwardable def_delegator in Topic 2013-08-28 11:25:57 +00:00
Einar Jonsson
b385cdcc34 Extracted featured_users functionality out of Topic.
* Created a TopicFeatureUsers model
* Topic#featured_user_ids and Topic#feature_topic_users now delegate to
* a TopicFeatureUsers instance to keep demeter happy.
2013-08-27 09:10:50 +00:00
Ben Hicks
b13796c35e Refactoring the feature_topic_users method to improve
the code climate score.
2013-08-14 20:42:16 -05:00
Robin Ward
652169daf6 Include a list of more new topics in the digest emails at the bottom 2013-08-09 14:43:02 -04:00
Stephan Kaag
f99acebdaa Rails 4 updates 2013-07-24 21:09:18 +02:00
Sam
ea7684fb32 Merge pull request #1226 from stephankaag/rails4_updates
Some Rails4 updates
2013-07-22 15:03:37 -07:00
Stephan Kaag
0e3b8fbb24 Remove some calls to all. They are not required, and Rails4 raises warnings about them. 2013-07-22 20:44:11 +02:00
Stephan Kaag
b19f631b3a Some Rails4 updates 2013-07-22 19:01:22 +02:00
Sam
31bb08bcdd added an option to bypass auto tracking of topics on post creation 2013-07-22 15:07:20 +10:00
Sam
9e4b0df7ff 69 specs fail in rails 4 now ...not too bad 2013-07-22 15:07:20 +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
Robin Ward
f9d1fcb169 Merge pull request #1140 from stephankaag/code_refactoring
Refactor code that raises deprecating warnings in Rails 4
2013-07-09 06:48:48 -07: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
Stephan Kaag
2abfd38aee Refactor code that raises deprecating warnings in Rails 4 2013-07-08 18:35:11 +02:00
Sam
ca7c10df9a Merge pull request #1139 from stephankaag/correct_image_url_rails4
No need to include all ActionView::Helpers in Topic
2013-07-03 23:29:43 -07:00
Neil Lalonde
2c8ed8414c If an auto-closing topic is manually closed, remove the auto-close countdown 2013-07-03 16:54:41 -04:00
Stephan Kaag
7cc7116680 No need to include all ActionView::Helpers in Topic, we only need the sanitize helper.
This also fixes a bug in Rails 4 where image_url gets accidentally overridden.
2013-07-03 21:43:29 +02:00
Stephan Kaag
89b621d31a Refactor update_all statements in order to prevent deprecation warnings in Rails 4 2013-07-02 18:36:47 +02:00
Sam
f6b850e7a4 allow skipping the validations on creation if its an api call AND skip_validations is specified
this allows wordpress plugin to post very very short titles or titles that would otherwise be disallowed
2013-07-02 12:23:19 +10:00
Sam
7681ba0c32 don't fail this query cause avg_time is 0 2013-06-30 01:30:47 +10:00
Sam
799b402778 fix horribly broken invite code, could lead to inviting the wrong person to a conversation 2013-06-19 10:31:19 +10: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
Sam
e6e81efe85 correct information leak in page not found 2013-06-13 10:27:17 +10: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
1756f713d6 SECURITY HOLE, upgrade right away if you are using Secure Groups. 2013-06-08 23:52:06 +10:00
Neil Lalonde
169125e96d Fix a case where a random topic with null slug will be rendered instead of 404 2013-06-07 14:30:26 -04: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
Robin Ward
0b97ea6345 Better HTML emails, smarter email digests, new email section in admin with digest preview 2013-06-05 17:47:25 -04:00
Sam
870e59883b secure the links on the topic pages, eliminated deleted topics as well. 2013-06-05 16:10:26 +10: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
21a54567ff Extract TopicStatusUpdate from Topic 2013-05-28 09:01:04 -07:00
Chris Hunt
54a798eb12 Add Topic#age_in_days for determining age of topic 2013-05-27 18:02:15 -07:00
Robin Ward
e1781240a6 Merge branch 'refactoring' of git://github.com/mattvanhorn/discourse
Conflicts:
	lib/text_sentinel.rb
2013-05-27 10:42:20 -04:00
Robin Ward
a15910ad1e Merge pull request #899 from chrishunt/chrishunt/extract-topic-posters-summary
Extract topic posters summary
2013-05-27 06:30:58 -07:00
Chris Hunt
6024529f81 Extract PostMover from Topic into its own class 2013-05-26 18:42:04 -07:00
Chris Hunt
b8fbac582e Add Topic#url for determining url for a Topic 2013-05-25 17:44:32 -07:00
Chris Hunt
f2b5e20840 Add Topic#max_post_number to find max post number 2013-05-25 17:44:32 -07:00
Chris Hunt
c1841a6c89 Extract Topic#posters_summary 2013-05-24 15:33:45 -07:00
Matt Van Horn
e5e904aa4e minor refactorings 2013-05-24 13:36:33 -07:00
Matt Van Horn
d7817cf314 extract TopicNotifier class from topic 2013-05-24 13:36:33 -07:00
Sam
ca2dee52db moved comments to the bottom, they are way less intrusive there 2013-05-24 12:48:32 +10:00
Sam
2cd95bc649 lets try out annotations 2013-05-24 12:35:14 +10:00
Matt Van Horn
c4b5821ef8 Revert annotation and non-English I18n changes 2013-05-23 06:44:47 -07:00
Matt Van Horn
7271b90655 annotate topic model 2013-05-22 22:36:01 -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