Commit Graph

250 Commits

Author SHA1 Message Date
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
Sam f0a122a66c move job files so they live underneath app/ and not in lib/
introduce new setting email_always, that will force emails to send to users regardless of presence on site
2013-10-01 17:04:02 +10:00
Sam Saffron 085493e35d optimise regular job to avoid touching posts that have not changed 2013-09-19 23:00:42 -07:00
Neil Lalonde 78c15d5810 Move the unique post key storage code into the Post model 2013-09-09 16:17:31 -04:00
Neil Lalonde eae7e75611 FIX: recover post by a non-staff user fails because the post is not unique. Uniqueness check shouldn't happen when recovering a deleted post. 2013-09-06 11:50:15 -04:00
Neil Lalonde 117fc8db58 Change the way nuked users' posts are handled. Allow null in the user_id column of posts. Show these posts in the posts stream. 2013-09-04 15:42:21 -04:00
Robin Ward 1c3804934e Show the entire history of replies above a post when you expend "in reply to" 2013-08-06 17:43:10 -04:00
Régis Hanol ed9417fa3b enable thumbnailing on S3
- added url to optimized image model
- refactored s3_store & local_store
2013-07-31 23:26:34 +02:00
Stephan Kaag b58da2fcf9 Add some TODO's 2013-07-22 22:39:20 +02:00
Stephan Kaag ebd5fa76c5 Reuse post-analyzer and cooked-document when requesting multiple post stats 2013-07-22 22:24:47 +02:00
Stephan Kaag ad2b667504 Remove dead code 2013-07-22 22:16:46 +02:00
Robin Ward 8b181e0803 Merge pull request #1230 from ZogStriP/add-newuser-max-attachments-setting
add newuser-max-attachments setting
2013-07-22 07:22:23 -07: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
Régis Hanol 2986798ba7 add newuser-max-attachments setting 2013-07-22 02:39:17 +02:00
Sam ecf17cfebb work in progress, add fidelity to category group permissions (full, create posts, readonly) 2013-07-16 15:46:11 +10:00
Neil Lalonde 8814f9ed05 Fix a case when a staff user views a topic with a deleted post by a nuked user; might be a temporary solution until we decide what to do with nuked records 2013-07-10 16:52:47 -04:00
Robin Ward b7327942af Add `deleted_by` to `Trashable` tables 2013-07-09 15:46:36 -04: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
Robin Ward bb908d5913 Email parsing uses Traditional Markdown Linebreaks by default. Added JS tests for line breaks. 2013-06-21 11:37:26 -04:00
Neil Lalonde 281a08a99f Allow people to capitalize a word when ninja-editing a post 2013-06-17 15:57:13 -04:00
Régis Hanol 454636abf1 annotate models 2013-06-17 02:49:34 +02:00
Régis Hanol 037f62928b add proper post_uploads reverse index 2013-06-13 23:44:24 +02:00
Neil Lalonde 4db8204a15 Remove topic links when a post is deleted 2013-06-13 13:41:54 -04:00
Robin Ward cb40ceb9e8 Merge pull request #1019 from ZogStriP/reverse-index-of-user-uploads
added a reverse index of user uploads + rake task
2013-06-13 07:20:55 -07:00
Sam f7de9f17d5 refactor validators
add a new setting for min pm body length
use that setting for flags
scale entropy check down for pms
2013-06-13 18:18:43 +10:00
Régis Hanol 770c1faeb1 added a reverse index of user uploads + rake task 2013-06-13 01:43:50 +02:00
Navin 3fdba0019b Extract callbacks and validations for Post
Move Post create callbacks to PostCreate
Extract Post validations
Move stripped_length_validator to lib/validators
2013-06-09 20:47:04 +02:00
Neil Lalonde c4904aacc0 Automatically flag someone as a spammer if their posts get at least X spam flags from N users while their trust level is 'new user'. Staff can clear and set this status from the user record in admin. 2013-06-03 16:37:40 -04:00
Navin cab3502c15 Replace PostAnalyser module with a class
Encapsulate Post#cooked_document as well
Include specs for PostAnalyzer class
2013-06-01 14:59:27 +02: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
Navin 1d5952a92f Extract analysis type methods to a module and refactor Post#raw_links 2013-05-28 16:41:18 +02:00
Chris Hunt c4cce68613 Add Post#is_first_post?
We should be able to ask a post if it's the first in a topic
2013-05-25 17:44:32 -07:00
Robin Ward d1fdc66ca4 FIX: For spam detection, don't count total occurances of links of the same host, but
post count including that host.
2013-05-24 15:20:58 -04:00
Robin Ward c0c97487d8 Merge pull request #888 from novemberkilo/master
Refactor to reduce complexity of Post#save_reply_relationships
2013-05-24 07:04:28 -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
Navin 9aacde2f2d Refactor Post#save_reply_relationships 2013-05-23 18:09:06 +02:00
Navin ba4eaa0297 Helper to create reply relationship with post 2013-05-23 18:08:24 +02:00
Navin d7219a6fbc Helper to add a number to quoted_post_numbers 2013-05-23 18:07:45 +02:00
Sam 3dfc034e8d Merge pull request #881 from novemberkilo/master
Improve flog metric for Post#extract_quoted_post_numbers
2013-05-23 00:21:27 -07:00
Robin Ward 7a31630837 Search Refactor: Remove some manual SQL, make search data tables more idomatic Rails/AR 2013-05-22 16:31:13 -04:00
Navin 4754216369 Simplify branching 2013-05-22 21:45:31 +02:00
Navin ef93512de8 Extract quote parsing into a method 2013-05-22 21:38:45 +02:00
Neil Lalonde 5f7f87437c Fix for topic excerpt being from the wrong post 2013-05-18 13:35:21 -04:00
Brian Plexico a86646312b Refactored post model to reduce duplication in validator methods 2013-05-17 12:15:21 -04:00
Robin Ward d554a59102 Support for a new site setting: `newuser_spam_host_threshold`. If a new user posts a link
to the same host enough tiles, they will not be able to post the same link again.

Additionally, the site will flag all their previous posts with links as spam and they will
be instantly hidden via the auto hide workflow.
2013-05-16 12:19:50 -04:00
Sam e9fc272db7 remove acts_as_paranoid, use .trash! , .recover! and .with_deleted as needed
makes upgrading to rails 4 possible
2013-05-07 14:39:01 +10:00
Sam b25a5a20bb option to strip links from excerpts 2013-04-30 13:25:55 +10:00
Sam 37867af1bb track incoming links, amend share link to include user
fix pm styling
2013-04-24 18:05:35 +10:00
Sam cfc62dadff speed up tests
add the ability to find the first notify private message
2013-04-22 17:45:03 +10:00
Jeff Atwood b64a4100fa change "visitor" trust level to "new user"
I blame me for this mistake.. visitor means other stuff in practice. New
User is correct meaning.
2013-04-17 16:11:24 -07:00
Neil Lalonde 3b6aeb14c7 Add subtype to topics to classify private messages 2013-04-16 16:56:18 -04:00
Neil Lalonde 36dc5874e5 Post image_count doesn't count favicons and thumbnails in oneboxes, so visitors can post links that get oneboxed 2013-04-11 12:36:45 -04:00
Sam 5f30ea7463 Merge pull request #684 from ZogStriP/auto-replace-rules-in-titles
auto replace rules in titles
2013-04-10 21:12:20 -07:00
Régis Hanol d120a5d139 FIX: setting min_topic_title_length is ignored 2013-04-10 14:54:10 +02:00
Régis Hanol c5cf8be864 auto replace rules in titles 2013-04-10 11:00:50 +02:00
Sam 33e3ad1603 clean up onebox application so it uses a single code path
use fragments for oneboxes
strip parent <p> if <div> is in it
clean some tests
2013-04-10 17:52:38 +10:00
Neil Lalonde 467d59ec5a Merge some work: topic counts in category select; fix All count on dashboard 2013-04-08 10:23:29 -04:00
Robin Ward fe8d2377e8 admins/moderators should not receive "body is too similar" when editing
a regular user's post.
2013-04-05 15:38:03 -04:00
Neil Lalonde eb212aec9b Fix dashboard totals for topics, posts, and private messages 2013-04-05 14:09:16 -04:00
Robin Ward af9b27358c If an admin or moderator edits a visitor's post, the restrictions should be based
on the *editors* access rights, not the original poster.
2013-04-05 13:59:00 -04:00
Neil Lalonde bb18b6cb9b Dashboard: split out private messages from topic and post counts; re-enable report_spec because I think I fixed it... 2013-04-03 13:26:09 -04:00
Robin Ward e8d66beea5 Fix @notification text for non visitors 2013-04-02 11:58:12 -04:00
Robin Ward c372e36cb6 Don't count @mentions as links in a post 2013-03-25 13:12:15 -04:00
Robin Ward 6568b4aaa9 Better error messages when hitting max mentions/images/links 2013-03-25 12:27:09 -04:00
Robin Ward 9c38c13ac5 The "Best Of" mode uses a percentage ranking of posts. 2013-03-22 15:44:39 -04:00
Dan Berman 9ad5720090 someone's been playing too much 2013-03-22 06:18:48 -04:00
Robin Ward babcfe6234 Cache oneboxes in Redis now instead of postgres. 2013-03-21 13:11:54 -04:00
Sam 2a047df4f1 cache reply_to_user_id in post to eliminate a very nasty n+1 query 2013-03-19 16:54:23 -07: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 897d48b145 Moved more `Post` callbacks into service classes 2013-03-18 17:54:55 -04:00
Robin Ward d5e4243f02 Move draft sequence incrementing out of `after_save` 2013-03-18 17:54:50 -04:00
Robin Ward 5aec5261a7 Converted flag threshold constants to enums 2013-03-18 17:54:43 -04:00
Robin Ward b6224b014c Move a bunch of callbacks into PostCreator 2013-03-18 13:56:26 -04:00
Robin Ward ea20993bed FIX: Don't create a new version when a post is recovered. Also display username instead of full name for consistency. 2013-03-13 12:35:55 -04:00
Neil Lalonde 8927432a93 Add stats to the admin dashboard 2013-03-09 15:34:27 -05:00
Robin Ward f8d8272406 Cleaned up TopicUserSpec, introduces clearing of pinned topics 2013-03-07 12:19:25 -05:00
Kuba Brecka dc62136642 various typos in comments 2013-03-06 08:52:24 +01:00
Régis Hanol 239cbd2d58 enforce coding convention
replaced every `and` by `&&` and every `or` by `||`
2013-03-05 01:42:44 +01:00
Gosha Arinich 0c99dea153 introduce Enum 2013-03-01 21:16:36 +03:00
Gosha Arinich 6e5399d544 minor cleanup, using AR querying DSL over raw SQL in some places 2013-02-28 21:54:12 +03:00
Alexander 8855a0bfbe RSS of a topic via new route
Adds TopicView#recent_posts; Post#by_newest, #with_user, #author_readable; User#readable_name
Autodiscovery tag in topic show HTML.
2013-02-26 14:54:17 -08:00
Gosha Arinich cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Robin Ward ae9bee2a91 Merge pull request #172 from jeremybanks/master
Do not strip leading and trailing whitespace from raw posts
2013-02-19 08:15:39 -08:00
Sam Saffron d9531d94d5 basic lightbox support 2013-02-19 17:57:14 +11:00
Jeremy Banks 6af69f7e77 Do not strip leading and trailing whitespace from raw posts. 2013-02-15 20:58:33 -05:00
Jaime Iniesta 6995e75d41 Replace Hpricot with Nokogiri 2013-02-14 11:35:50 +01:00
Sam Saffron 99526c33da emoji should not be coupled into the core
avatars were being counted and should not have been for basic users
2013-02-12 18:43:48 +11:00
Robin Ward 57049b55a2 Little things:
- Retries on deadlock when calculating average time
- Removes Warning: When specifying html format for errors
- Doesn't use manual SQL to update user's ip address
2013-02-11 15:47:28 -05:00
Grant Ammons 701ecddac2 factor out @post.revise into its own class. clean up PostRevisor class to be more readable 2013-02-09 10:33:25 -05:00
Robin Ward 25e9cfe3b8 Remove the distinction between "x replies below" and "x replies" 2013-02-08 17:10:18 -05:00
Robin Ward 084a873b91 Give regular users a delete button. If they click it, their post will be revised to
say it was deleted.
2013-02-07 15:14:23 -05:00
Jakub Arnold 61654ab8f0 Fix all the trailing whitespace 2013-02-07 16:45:24 +01:00
Sam Saffron 85973ce6b0 added delete all posts button
wired up the ability to enable all themes
2013-02-07 18:11:56 +11:00
Sam Saffron 8f4417f962 Merge branch 'master' of github.com:discourse/discourse 2013-02-07 16:00:55 +11:00
Sam Saffron c7461622a9 admins can now clear flags inline 2013-02-07 15:15:48 +11:00
Robin Ward 40da901e5d Introduction of TextSentinel to enforce title and body quality. 2013-02-06 20:53:34 -05:00
Sam Saffron 6f2f7b0589 flagging work, we should be clearing from the mod menu if a topic or post is deleted 2013-02-06 12:13:41 +11:00
Robin Ward 21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00