Commit Graph

1102 Commits

Author SHA1 Message Date
Robin Ward 6853f37bee Show estimated reading time near summarize button. 2013-12-10 13:47:36 -05:00
Neil Lalonde 561961eff6 FIX: can grant titles to regular users. Guardian initializer needs current_user, not the target user. 2013-12-10 12:46:35 -05:00
Neil Lalonde 2596f7dec2 Revert "Stop using user agent to detect mobile devices. Use a media query and yepnope to load the appropriate css and customizations." 2013-12-09 16:28:11 -05:00
Neil Lalonde ca5d4d5e54 Stop using user agent to detect mobile devices. Use a media query and yepnope to load the appropriate css and customizations. 2013-12-09 13:28:42 -05: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
Robin Ward 79427732b2 Show Gaps in the post stream when filters are active
Conflicts:
	app/assets/javascripts/discourse/templates/topic.js.handlebars
2013-12-05 16:46:59 -05:00
Scott Albertson 51eff92170 Refactor UsersController#create
* Simplify controller action
* Extract service classes
2013-12-05 10:11:16 -08:00
Neil Lalonde abed146cc7 FIX: Category description topics shouldn't auto-close 2013-12-04 10:31:25 -05:00
Jithu Gopal 9584ecb295 fixing gender sensitive pronouns 2013-12-03 10:19:54 +05:30
Régis Hanol 5150376e12 add wrapper class for lightboxes 2013-12-02 10:06:48 +01:00
Godfrey Chan 1a2114d87d Don't abuse as_json, it's not meant for consumption
The `as_json` API is a hook for JSON encoders to call, not meant for
consumption like this, and the result is not guarenteed to be stable
across Rails versions.

There might be other cases like this that we should revisit later, but
this one in particular is causing a test to fail on Rails master.
2013-11-29 21:58:09 -08:00
Régis Hanol 298b54c0e7 add download link in lightbox 2013-11-29 20:03:39 +01:00
Robin Ward 8c8645f158 FIX: Code and Emoticon formatting in HTML emails. 2013-11-28 17:21:14 -05:00
Neil Lalonde 4ec0543362 FIX: emails with embedded posts should always use absolute URLs 2013-11-28 15:57:21 -05:00
Neil Lalonde 1cc72d564f Add specs for topic create with auto_close_time. Just ignore auto_close_time from users who are not authorized to use it instead of raising an error. 2013-11-28 11:06:04 -05:00
Régis Hanol 52160179f8 add a tombstone for extra safety 2013-11-27 22:05:11 +01: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
Régis Hanol 6b6c3d05dd FIX stretched thumbnails 2013-11-25 18:36:13 +01:00
Robin Ward d208be14d2 FIX: Ruby 1.9.3 UTF-8 bug 2013-11-25 11:29:58 -05:00
Régis Hanol 82b78ec6ba schemaless avatar urls 2013-11-22 19:18:45 +01:00
Régis Hanol 3cf5a363f7 do not destroy uploads when destroying a user 2013-11-22 18:29:07 +01:00
Sam 49b48e1eb6 ensure we have a bigint id 2013-11-22 17:51:36 +11:00
Régis Hanol f65cde3cda do not bump posts when rebaking 2013-11-22 01:52:26 +01:00
Neil Lalonde bcfbacec16 Don't show category descriptions as suggested topics 2013-11-21 16:43:22 -05:00
Neil Lalonde 69cc1dd689 FIX: don't suggest a username that's already taken, even if hub finds a match 2013-11-20 14:56:21 -05:00
Robin Ward 5055da76e6 Abort triggers for email body processing 2013-11-20 13:30:01 -05:00
Régis Hanol 31fd5b85bc FIX markdown hotlinked images were not properly pulled 2013-11-20 13:10:08 +01:00
Neil Lalonde 981d8f6aea Signup form: prefill username if Discourse Hub has a match for the email address. Also, fix some bad specs in username_checker_service_spec that were passing... 2013-11-19 14:15:28 -05:00
Neil Lalonde ae58a7db95 Add a warning on dashboard if enforce_global_nicknames is checked, but access key is blank. 2013-11-18 13:45:10 -05:00
Robin Ward 4ce81e1b01 Rename "Best Of" to "Summary" 2013-11-18 12:48:26 -05:00
Robin Ward ad3e276b4b Rename TopicSummary -> TopicMap 2013-11-18 12:08:21 -05:00
Robin Ward 639394e38a FIX: Pinned topics within a category weren't working without a refresh 2013-11-18 10:52:01 -05:00
Régis Hanol 482b752046 add edit reason when editing a post 2013-11-15 23:28:49 +01:00
Neil Lalonde fc180ccd71 Site settings: move category into the opts hash so that it's compatibale with existing plugins 2013-11-15 14:32:33 -05:00
railsaholic 34bba737ff Refactor SessionController#create, reduce complexity.
Don't compromise readablity
2013-11-15 22:09:03 +05:30
Régis Hanol 8a83f1a88f add disk space usage failsafe 2013-11-15 16:48:38 +01:00
Robin Ward e03ae73c5d Merge pull request #1653 from ScotterC/uri-addressable
URI adapter should use Addressable
2013-11-15 07:24:57 -08:00
Régis Hanol 16267e4887 add download_remote_images_to_local site setting 2013-11-15 15:22:18 +01:00
Neil Lalonde 1e37abc310 Add site setting category support 2013-11-14 16:02:13 -05:00
Neil Lalonde 791f5ac94e Load site settings from config/site_settings.yml 2013-11-14 16:02:13 -05:00
Robin Ward 968c0672ef Enable column sorting main topic list 2013-11-14 15:50:36 -05:00
Robin Ward 67041d1c6d Support for tracking the count of unique participants in a topic 2013-11-14 14:32:41 -05:00
Scott Carleton 32e414690a Handle ugly url targets 2013-11-14 13:14:02 -05:00
Robin Ward bda5a72c6a Server side support for custom ordering of topics 2013-11-13 14:17:06 -05:00
Robin Ward 7207cef7aa TopicQuery cleanup in advance of custom sorting:
- Move SQL method constants into a module
- Removed unused count methods
- Moved methods that don't return a TopicList into Topic
- Replaced some confusing method signatures
2013-11-13 12:26:32 -05:00
Scott Albertson 77b59b54ce Refactor UsersController#invited
* Add test coverage
* Simplify controller action
* Move finder code to Invite class
2013-11-11 13:23:49 -08:00
Neil Lalonde 2f8866add5 Change admin display-row css so that multiple lines can fit in the control column. Don't hard-code a height on the rows. 2013-11-11 15:03:17 -05:00
Régis Hanol d65cd0f97e Merge pull request #1637 from railsaholic/refactor_users_upload_avatar_action
Refactor Users#upload_avatar method
2013-11-11 09:59:30 -08:00
railsaholic 58f78e9001 Refactor Users#upload_avatar method
Moved avatar file upload to ```AvatarUploadService``` class and
```AvatarUploadPolicy```

Address review comments + require missing file in spec
2013-11-11 23:21:14 +05:30
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
Sam a9c5d843f7 remove problem spec that does not work properly in rails 4 mode into application controller and correct it 2013-11-11 10:50:48 +11:00
sirMackk af67284995 User ctrl refactor - breaks up large methods, moves some logic into model
Includes missing methods from backup for travis to pass

fix missing code, failing specs

keep params handling in the controller.
2013-11-09 18:44:13 +05:30
Robin Ward 6e43372e7c Merge pull request #1610 from salbertson/sa-refactor-users-update
Move logic for updating a user to a service class
2013-11-07 12:29:19 -08:00
Neil Lalonde 0c6f794eb0 Used the term suspended instead of banned. 2013-11-07 13:53:49 -05:00
Scott Albertson 72bfa4471f Move logic for updating a user into a service class 2013-11-07 08:39:39 -08:00
Robin Ward 948a545cb1 Category descriptions should not appear in digests 2013-11-06 15:05:06 -05:00
Robin Ward de30af9302 Support for inviting to a forum from a user's invite page. 2013-11-06 12:56:50 -05:00
Régis Hanol 8d47215ea5 Fixed Youtube videos appearing on top of compose panel (props to @hrobertson) 2013-11-06 17:19:02 +01:00
Régis Hanol f8e2ecfa94 keep track of the user who revised a post 2013-11-06 11:43:40 +01:00
Régis Hanol 3992aa971d ninja_edit_window is is seconds, not minutes 2013-11-06 11:08:57 +01:00
Robin Ward 25ef66c60b User invites page now has search, displays first `invites_shown` records 2013-11-05 17:53:26 -05:00
Régis Hanol 37fd7ab574 pull hotlinked images 2013-11-05 19:07:29 +01:00
Sam 415d4df648 work around bust encodings passed in to method 2013-11-05 13:40:39 +11:00
Neil Lalonde bd9b85f076 Screened Urls page shows results for each domain instead of each url 2013-11-04 16:24:48 -05:00
Robin Ward c86b06e3fa Fix for non-english email polling. 2013-11-04 15:30:24 -05:00
Neil Lalonde ede59a4386 FIX: issue 1538. After upgrading and before a new version check request has been made, dashboard might still say that an update is available. 2013-11-04 12:51:09 -05:00
Robin Ward b474babe26 Merge pull request #1602 from salbertson/sa-refactor-users-update-specs
Refactor specs for UsersController#update
2013-11-04 07:16:18 -08:00
Vipul A M 895d801669 Dont call `SiteSetting.uncategorized_category_id` twice 2013-11-03 15:36:59 +05:30
Régis Hanol b56b11d96a add qunit to autospec 2013-11-01 23:57:50 +01:00
Neil Lalonde e679ba97a3 FIX: categories created by users who are deleted cannot be deleted 2013-11-01 16:56:15 -04:00
Scott Albertson c0cffca1e6 Test title updating 2013-11-01 13:43:31 -07:00
Scott Albertson 3cc17ad4cd Add test coverage for #update 2013-11-01 13:43:31 -07:00
Scott Albertson 58f96bdfb5 Remove duplication in test setup 2013-11-01 13:43:31 -07:00
Scott Albertson 2e7696630b Make #update specs consistent
* Use expect syntax
* Avoid lets
* Stub Guardian method used in the controller
2013-11-01 13:43:31 -07:00
Neil Lalonde 92a0729937 When banning a user, a reason can be provided. The user will see this reason when trying to log in. Also log bans and unbans in the staff action logs. 2013-11-01 10:47:26 -04:00
Neil Lalonde 52b0c1c45f When logging the deletion of a user, don't store its id in the target_user_id column. It will never match a user record. 2013-11-01 10:47:26 -04:00
Robin Ward 744cd93f28 FIX: Non-English category name regression 2013-10-31 16:25:26 -04:00
Neil Lalonde ce5ebc3eb5 On sites with login_required enabled, after signup, don't show the /login page again 2013-10-30 16:37:36 -04:00
Robin Ward 704adc00ca FIX: Broken test. No idea why the name randomly changed! 2013-10-30 16:04:26 -04:00
Robin Ward 3d6d7c8abe SiteSetting to hide regular names from users 2013-10-30 15:45:34 -04:00
Neil Lalonde c8d5db38d6 Emails to banned users will be sent for notifications of PMs from staff users 2013-10-30 15:31:16 -04:00
Robin Ward 6063b52d6a Support for choosing a destination category when splitting topics. 2013-10-29 15:30:06 -04: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 95e936c299 cleanup API for looking up a user by email or username, add specs, fix invalid auto association in open id provider 2013-10-28 16:29:07 +11:00
Sam 370e961a90 add failing test for AMS upgrade 2013-10-28 15:55:27 +11:00
Robin Ward f4d9bf9181 Merge pull request #1573 from railsaholic/use_existing_find_by_username_or_email
Utilize already existing method 'find_by_username_or_email'
2013-10-25 12:57:18 -07:00
Neil Lalonde 4e46d91b8d Refactor SpamRulesEnforcer so that each spam rule is in its own class 2013-10-25 13:25:02 -04:00
Sam 4929c5db71 FIX: when allow_uncategorized_topics was false, PMs can not be created 2013-10-25 09:33:39 +11:00
Manoj 96ae3cdacc Utilize already existing method 'find_by_username_or_email'
check presence of email using include, dont use =~
2013-10-24 19:26:06 +05:30
Sam cc83b55134 fix incorrect test, that fails if shared test state gets corrupt 2013-10-24 14:55:55 +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
Neil Lalonde 8aab2253d0 Whitelisted ip addresses will not be flagged as spam by flag_sockpuppets 2013-10-23 17:11:35 -04:00
Robin Ward 541620c115 Routes and support for sub-categories 2013-10-23 15:22:49 -04:00
Robin Ward c814fc16a3 Database structure to support sub categories 2013-10-23 15:22:49 -04:00
Robin Ward f73a64982a Raise an error if a `api_username` is supplied and does not match the key 2013-10-23 11:05:49 -04:00
Brian Alexander e2a5415aca fix #1567; nil reference in spam_rules_enforcer.rb 2013-10-22 19:14:31 -06:00
Neil Lalonde c1008f4359 Fixes for postgresql inet columns in Rails 4. They're backed by an IPAddr class now, which breaks sql parameter marker support, and automatically sets the attribute to nil when trying to assign an invalid ip address. 2013-10-22 19:19:32 -04:00
Robin Ward 348e2e3ef2 Support for per-user API keys 2013-10-22 17:34:39 -04:00
Neil Lalonde 7d582fbee3 Screened ip address can be edited, deleted, and changed to allow or block. 2013-10-22 16:30:46 -04:00
Régis Hanol 9b2f821012 Merge pull request #1512 from ScotterC/avatar-from-url
Build out a URI Adapter to allow uploading an avatar via a url
2013-10-21 13:17:37 -07:00