{{/with}}
diff --git a/app/assets/stylesheets/application/topic-post.css.scss b/app/assets/stylesheets/application/topic-post.css.scss
index f9cb327ee30..c972a2b829f 100644
--- a/app/assets/stylesheets/application/topic-post.css.scss
+++ b/app/assets/stylesheets/application/topic-post.css.scss
@@ -431,6 +431,7 @@
a.arrow {
float: right;
margin: 3px 0 3px 0;
+ color: grey;
}
}
From b91ac453597168d3f0b13ab58f5b8519d7cb9825 Mon Sep 17 00:00:00 2001
From: tms
Date: Sat, 16 Feb 2013 16:33:51 -0500
Subject: [PATCH 07/35] Avoid grouping user stats by archetype (filter happens
beforehand)
---
app/models/user_action.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/models/user_action.rb b/app/models/user_action.rb
index 00cb87c0ca4..6d56f07f1f5 100644
--- a/app/models/user_action.rb
+++ b/app/models/user_action.rb
@@ -42,7 +42,7 @@ class UserAction < ActiveRecord::Base
results = UserAction.select("action_type, COUNT(*) count, '' AS description")
.joins(:target_topic)
.where(user_id: user_id)
- .group('action_type', 'topics.archetype')
+ .group('action_type')
# should push this into the sql at some point, but its simple enough for now
unless guardian.can_see_private_messages?(user_id)
From b7e392c7a372a99781fd882ce22a81010500f287 Mon Sep 17 00:00:00 2001
From: tms
Date: Sat, 16 Feb 2013 16:46:20 -0500
Subject: [PATCH 08/35] Don't count bookmark stats for users who can't see them
---
app/models/user_action.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/models/user_action.rb b/app/models/user_action.rb
index 6d56f07f1f5..1ae9a929e26 100644
--- a/app/models/user_action.rb
+++ b/app/models/user_action.rb
@@ -44,10 +44,14 @@ class UserAction < ActiveRecord::Base
.where(user_id: user_id)
.group('action_type')
- # should push this into the sql at some point, but its simple enough for now
+ # We apply similar filters in stream, might consider trying to consolidate somehow
unless guardian.can_see_private_messages?(user_id)
results = results.where('topics.archetype <> ?', Archetype::private_message)
end
+
+ unless guardian.user && guardian.user.id == user_id
+ results = results.where("action_type <> ?", BOOKMARK)
+ end
results = results.to_a
From fac75401ef3fcb7f4654eb5470d60f12e8dc096c Mon Sep 17 00:00:00 2001
From: Dan Neumann
Date: Sat, 16 Feb 2013 14:57:16 -0600
Subject: [PATCH 09/35] category stats shouldn't include deleted topics.
---
app/models/category.rb | 33 +++++++---------
app/models/topic.rb | 6 ++-
spec/fabricators/topic_fabricator.rb | 4 ++
spec/models/category_spec.rb | 58 ++++++++++++++++++++--------
4 files changed, 66 insertions(+), 35 deletions(-)
diff --git a/app/models/category.rb b/app/models/category.rb
index d180a34eb6a..b0e67c869cf 100644
--- a/app/models/category.rb
+++ b/app/models/category.rb
@@ -17,7 +17,6 @@ class Category < ActiveRecord::Base
after_save :invalidate_site_cache
after_destroy :invalidate_site_cache
-
def uncategorized_validator
return errors.add(:name, I18n.t(:is_reserved)) if name == SiteSetting.uncategorized_name
return errors.add(:slug, I18n.t(:is_reserved)) if slug == SiteSetting.uncategorized_name
@@ -26,24 +25,22 @@ class Category < ActiveRecord::Base
def self.popular
order('topic_count desc')
end
-
+
+ # Recalculates `topics_year`, `topics_month`, and `topics_week`
+ # for each Category.
def self.update_stats
- exec_sql "UPDATE categories
- SET topics_week = (SELECT COUNT(*)
- FROM topics as ft
- WHERE ft.category_id = categories.id
- AND ft.created_at > (CURRENT_TIMESTAMP - INTERVAL '1 WEEK')
- AND ft.visible),
- topics_month = (SELECT COUNT(*)
- FROM topics as ft
- WHERE ft.category_id = categories.id
- AND ft.created_at > (CURRENT_TIMESTAMP - INTERVAL '1 MONTH')
- AND ft.visible),
- topics_year = (SELECT COUNT(*)
- FROM topics as ft
- WHERE ft.category_id = categories.id
- AND ft.created_at > (CURRENT_TIMESTAMP - INTERVAL '1 YEAR')
- AND ft.visible)"
+ topics = Topic
+ .select("COUNT(*)")
+ .where("topics.category_id = categories.id")
+ .visible
+
+ topics_year = topics.created_since(1.year.ago).to_sql
+ topics_month = topics.created_since(1.month.ago).to_sql
+ topics_week = topics.created_since(1.week.ago).to_sql
+
+ Category.update_all("topics_year = (#{topics_year}),
+ topics_month = (#{topics_month}),
+ topics_week = (#{topics_week})")
end
# Use the first paragraph of the topic's first post as the excerpt
diff --git a/app/models/topic.rb b/app/models/topic.rb
index 8c26deca3c2..5977f5bd7ed 100644
--- a/app/models/topic.rb
+++ b/app/models/topic.rb
@@ -167,7 +167,11 @@ class Topic < ActiveRecord::Base
def self.visible
where(visible: true)
end
-
+
+ def self.created_since(time_ago)
+ where("created_at > ?", time_ago)
+ end
+
def private_message?
self.archetype == Archetype.private_message
end
diff --git a/spec/fabricators/topic_fabricator.rb b/spec/fabricators/topic_fabricator.rb
index 8647b0e17fd..bc4e6074663 100644
--- a/spec/fabricators/topic_fabricator.rb
+++ b/spec/fabricators/topic_fabricator.rb
@@ -3,6 +3,10 @@ Fabricator(:topic) do
title { sequence(:title) { |i| "Test topic #{i}" } }
end
+Fabricator(:deleted_topic, from: :topic) do
+ deleted_at Time.now
+end
+
Fabricator(:topic_allowed_user) do
end
diff --git a/spec/models/category_spec.rb b/spec/models/category_spec.rb
index 96bf849e427..c796742837a 100644
--- a/spec/models/category_spec.rb
+++ b/spec/models/category_spec.rb
@@ -157,31 +157,57 @@ describe Category do
end
describe 'update_stats' do
-
- # We're going to test with one topic. That's enough for stats!
+
before do
@category = Fabricate(:category)
-
- # Create a non-invisible category to make sure count is 1
- @topic = Fabricate(:topic, user: @category.user, category: @category)
-
- Category.update_stats
- @category.reload
end
+
+ context 'with regular topics' do
- it 'updates topics_week' do
- @category.topics_week.should == 1
+ before do
+ @category.topics << Fabricate(:topic,
+ user: @category.user)
+ Category.update_stats
+ @category.reload
+ end
+
+ it 'updates topics_week' do
+ @category.topics_week.should == 1
+ end
+
+ it 'updates topics_month' do
+ @category.topics_month.should == 1
+ end
+
+ it 'updates topics_year' do
+ @category.topics_year.should == 1
+ end
+
end
+
+ context 'with deleted topics' do
- it 'updates topics_month' do
- @category.topics_month.should == 1
- end
+ before do
+ @category.topics << Fabricate(:deleted_topic,
+ user: @category.user)
+ Category.update_stats
+ @category.reload
+ end
+
+ it 'does not count deleted topics for topics_week' do
+ @category.topics_week.should == 0
+ end
+
+ it 'does not count deleted topics for topics_month' do
+ @category.topics_month.should == 0
+ end
+
+ it 'does not count deleted topics for topics_year' do
+ @category.topics_year.should == 0
+ end
- it 'updates topics_year' do
- @category.topics_year.should == 1
end
end
end
-
From 72264e303484a82509adb47fdfc055477a3d8bdf Mon Sep 17 00:00:00 2001
From: Dan Neumann
Date: Sat, 16 Feb 2013 21:40:24 -0600
Subject: [PATCH 10/35] added 'flagged_by' i18n.
---
app/assets/javascripts/admin/templates/flags.js.handlebars | 2 +-
config/locales/client.en.yml | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/assets/javascripts/admin/templates/flags.js.handlebars b/app/assets/javascripts/admin/templates/flags.js.handlebars
index c0b23f66c11..ac4046257b8 100644
--- a/app/assets/javascripts/admin/templates/flags.js.handlebars
+++ b/app/assets/javascripts/admin/templates/flags.js.handlebars
@@ -13,7 +13,7 @@
-
Flagged by
+
{{i18n admin.flags.flagged_by}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index a564cc0db9d..6a277547750 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -597,6 +597,7 @@ en:
clear_title: "dismiss all flags on this post (will unhide hidden posts)"
delete: "Delete Post"
delete_title: "delete post (if its the first post delete topic)"
+ flagged_by: "Flagged by"
customize:
title: "Customize"
From 7df5366aed6b2240abed46e1c1bfdf4c01344aa8 Mon Sep 17 00:00:00 2001
From: Dan Neumann
Date: Sat, 16 Feb 2013 22:55:43 -0600
Subject: [PATCH 11/35] fixed guide download link
---
docs/DEVELOPER-ADVANCED.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/DEVELOPER-ADVANCED.md b/docs/DEVELOPER-ADVANCED.md
index 9aba16d1ec4..906ecfe1b2f 100644
--- a/docs/DEVELOPER-ADVANCED.md
+++ b/docs/DEVELOPER-ADVANCED.md
@@ -11,7 +11,7 @@ to rails, you are likely much better off with our **[Discourse Vagrant Developer
3. Clone the project.
4. Create development and test databases in postgres.
5. Copy `config/database.yml.sample` and `config/redis.yml.sample` to `config/database.yml` and `config/redis.yml` and input the correct values to point to your postgres and redis instances.
-6. We recommend starting with seed data to play around in your development environment. [Download Seed SQL Data](http://discourse.org/vms/dev-discourse-seed.sql). Install it into postgres using a command like this: `psql -d discourse_development < dev-discourse-seed.sql`.
+6. We recommend starting with seed data to play around in your development environment. [Download Seed SQL Data][seed_download]. Install it into postgres using a command like this: `psql -d discourse_development < dev-discourse-seed.sql`.
## Before you start Rails
@@ -107,7 +107,7 @@ Edit /etc/postgresql/9.1/main/pg_hba.conf to have this:
host all all ::1/128 trust
host all all 0.0.0.0/0 trust # wide-open
-Download a database image from [http://discourse.org/vms/dev-discourse-seed.sql][1]
+Download a database image from [http://discourse.org/vms/dev-discourse-seed.sql][seed_download].
Load it (as vagrant user):
@@ -126,3 +126,5 @@ Load it (as vagrant user):
./install_server.sh
# Press enter to accept all the defaults
/etc/init.d/redis_6379 start
+
+[seed_download]: (http://discourse.org/vms/dev-discourse-seed.sql)
\ No newline at end of file
From fb5710b5d642059a6587823a9e51103949420fd8 Mon Sep 17 00:00:00 2001
From: tms
Date: Sun, 17 Feb 2013 01:38:20 -0500
Subject: [PATCH 12/35] Improved action descriptions/links on user stream items
---
.../discourse/models/user_action.js.coffee | 11 +++++++-
.../templates/user/stream.js.handlebars | 26 +++++++++++++++++--
.../stylesheets/application/user.css.scss | 3 +++
app/models/user_action.rb | 1 +
config/locales/client.en.yml | 8 +++++-
5 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/app/assets/javascripts/discourse/models/user_action.js.coffee b/app/assets/javascripts/discourse/models/user_action.js.coffee
index 88dc55073c6..1854434c264 100644
--- a/app/assets/javascripts/discourse/models/user_action.js.coffee
+++ b/app/assets/javascripts/discourse/models/user_action.js.coffee
@@ -2,10 +2,19 @@ window.Discourse.UserAction = Discourse.Model.extend
postUrl:(->
Discourse.Utilities.postUrl(@get('slug'), @get('topic_id'), @get('post_number'))
).property()
+
+ replyUrl: (->
+ Discourse.Utilities.postUrl(@get('slug'), @get('topic_id'), @get('reply_to_post_number'))
+ ).property()
isPM: (->
a = @get('action_type')
- a == UserAction.NEW_PRIVATE_MESSAGE || UserAction.GOT_PRIVATE_MESSAGE
+ a == Discourse.UserAction.NEW_PRIVATE_MESSAGE || a == Discourse.UserAction.GOT_PRIVATE_MESSAGE
+ ).property()
+
+ isPostAction: (->
+ a = @get('action_type')
+ a == Discourse.UserAction.RESPONSE || a == Discourse.UserAction.POST || a == Discourse.UserAction.NEW_TOPIC
).property()
addChild: (action)->
diff --git a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars
index 1890fb515fa..4a5d55f6182 100644
--- a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars
+++ b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars
@@ -5,9 +5,31 @@
- Please treat this discussion forum with the same respect you would a public park. We, too, are a shared community resource — a place to share skills, knowledge and interests through ongoing conversation.
-
-
-
- Use these guidelines to keep this a clean, well-lighted place for civilized public discourse. These are not hard and fast rules, merely aids to the human judgment of moderators and the overall community.
-
-
-
-
-
Improve the Discussion
-
- Help us make this a great place for discussion by always working to improve the discussion in some way, however small. If you are not sure your post adds to the discussion or might detract from its usefulness, think over what you want to say and try again later.
-
-
-
- The topics discussed here matter to us, and we want you to act as if they matter to you, too. Be respectful of the topics and the people discussing them, even if you disagree with some of what is being said.
-
-
- One way to improve the discussion is by searching for ones that are already happening. Please use the search function before starting a new discussion, and you will have a better chance of meeting others who share your interests.
-
-
-
-
-
-
Be Agreeable, Even When You Disagree
-
- You may wish to respond to something by disagreeing with it. That's fine. But, remember to criticize ideas, not people.
- Please avoid:
-
-
Name-calling.
-
Ad hominem attacks.
-
Responding to a post's tone instead of its actual content.
-
Knee-jerk contradiction.
-
-
-
-
- Instead, provide reasoned counter-arguments that improve the conversation.
-
-
-
-
-
-
Your Participation Counts
-
- The conversations we have here set the tone for everyone. Help us influence the future of this community by choosing to engage in discussions that make this forum an interesting place to be — and avoiding those that do not.
-
-
-
- Discourse provides tools that enable the community to collectively identify the best (and worst) contributions: favorites, bookmarks, likes, flags, replies, edits, and so forth. Use these tools to improve your own experience, and everyone else’s, too.
-
-
- Let’s try to leave our park better than we found it.
-
- Moderators have special responsibility and authority; they are technically responsible for this forum. But so are you. With your help, moderators should be community facilitators more than janitors or police.
-
-
-
- When you see bad behavior, don't reply. It encourages the bad behavior by acknowledging it, consumes your energy, and wastes everyone’s time. Just flag it. If enough flags accrue, action will be taken, either automatically or by moderator intervention.
-
-
- In order to maintain our community, moderators reserve the right to remove any content and any user account for any reason at any time. Moderators do not preview new posts or take any preemptive action, therefore, the moderators and site operators take no responsibility for any content posted by the community.
-
-
-
-
-
-
Always Be Civil
-
- Nothing sabotages a healthy conversation like rudeness:
-
-
Be civil. Don’t post anything that a reasonable person would consider offensive, abusive, or hate speech.
-
Keep it clean. Don’t post anything obscene or sexually explicit.
-
Respect each other. Don’t harass or grief anyone,
- impersonate people, or expose their private information.
-
Respect our forum. Don’t post spam or otherwise vandalize the forum.
-
-
-
-
- These are not concrete terms with precise definitions — avoid
- even the appearance of any of these things. If you're unsure, ask yourself how you would feel if your post was featured on the front page of the New York Times.
-
-
- This is a public forum, and search engines index these discussions. Keep the language, links, and images safe for family and friends.
-
-
-
-
-
-
Keep It Tidy
-
- Make the effort to put things in the right place, so that we can spend more time discussing and less cleaning up. So:
-
-
Don't start a topic in the wrong category.
-
Don't cross-post the same thing in multiple topics.
-
Don't post no-content replies.
-
Don't divert a topic by changing it midstream.
-
-
-
-
- Rather than posting "+1" or "Agreed," use the Like button. Rather than taking an existing topic in a radically different direction, use Reply as a New Topic.
-
-
- Also, don't sign your posts — every post has your profile information attached to it.
-
-
-
-
-
-
Post Only Your Own Stuff
-
- You may not post anything digital that belongs to someone else without permission. You may not post descriptions of, links to, or methods for stealing someone's intellectual property (software, video, audio, images), or for breaking any other law.
-
-
-
-
-
-
-
Terms of Service
-
- Yes, legalese is boring, but we must protect ourselves – and by extension, you and your data – against unfriendly folks. We have a Terms of Service describing your (and our) behavior and rights related to content, privacy, and laws. To use this service, you must agree to abide by our TOS.
-
+ Please treat this discussion forum with the same respect you would a public park. We, too, are a shared community resource — a place to share skills, knowledge and interests through ongoing conversation.
+
+
+
+ Use these guidelines to keep this a clean, well-lighted place for civilized public discourse. These are not hard and fast rules, merely aids to the human judgment of moderators and the overall community.
+
+ Help us make this a great place for discussion by always working to improve the discussion in some way, however small. If you are not sure your post adds to the discussion or might detract from its usefulness, think over what you want to say and try again later.
+
+
+
+ The topics discussed here matter to us, and we want you to act as if they matter to you, too. Be respectful of the topics and the people discussing them, even if you disagree with some of what is being said.
+
+
+ One way to improve the discussion is by searching for ones that are already happening. Please use the search function before starting a new discussion, and you will have a better chance of meeting others who share your interests.
+
+ The conversations we have here set the tone for everyone. Help us influence the future of this community by choosing to engage in discussions that make this forum an interesting place to be — and avoiding those that do not.
+
+
+
+ Discourse provides tools that enable the community to collectively identify the best (and worst) contributions: favorites, bookmarks, likes, flags, replies, edits, and so forth. Use these tools to improve your own experience, and everyone else’s, too.
+
+
+ Let’s try to leave our park better than we found it.
+
+ Moderators have special responsibility and authority; they are technically responsible for this forum. But so are you. With your help, moderators should be community facilitators more than janitors or police.
+
+
+
+ When you see bad behavior, don't reply. It encourages the bad behavior by acknowledging it, consumes your energy, and wastes everyone’s time. Just flag it. If enough flags accrue, action will be taken, either automatically or by moderator intervention.
+
+
+ In order to maintain our community, moderators reserve the right to remove any content and any user account for any reason at any time. Moderators do not preview new posts or take any preemptive action, therefore, the moderators and site operators take no responsibility for any content posted by the community.
+
+ Nothing sabotages a healthy conversation like rudeness:
+
+
Be civil. Don’t post anything that a reasonable person would consider offensive, abusive, or hate speech.
+
Keep it clean. Don’t post anything obscene or sexually explicit.
+
Respect each other. Don’t harass or grief anyone,
+ impersonate people, or expose their private information.
+
Respect our forum. Don’t post spam or otherwise vandalize the forum.
+
+
+
+
+ These are not concrete terms with precise definitions — avoid
+ even the appearance of any of these things. If you're unsure, ask yourself how you would feel if your post was featured on the front page of the New York Times.
+
+
+ This is a public forum, and search engines index these discussions. Keep the language, links, and images safe for family and friends.
+
+ Make the effort to put things in the right place, so that we can spend more time discussing and less cleaning up. So:
+
+
Don't start a topic in the wrong category.
+
Don't cross-post the same thing in multiple topics.
+
Don't post no-content replies.
+
Don't divert a topic by changing it midstream.
+
+
+
+
+ Rather than posting "+1" or "Agreed," use the Like button. Rather than taking an existing topic in a radically different direction, use Reply as a New Topic.
+
+
+ Also, don't sign your posts — every post has your profile information attached to it.
+
+ You may not post anything digital that belongs to someone else without permission. You may not post descriptions of, links to, or methods for stealing someone's intellectual property (software, video, audio, images), or for breaking any other law.
+
+ Yes, legalese is boring, but we must protect ourselves – and by extension, you and your data – against unfriendly folks. We have a Terms of Service describing your (and our) behavior and rights related to content, privacy, and laws. To use this service, you must agree to abide by our TOS.
+
+
+
\ No newline at end of file
diff --git a/app/views/static/privacy.html.erb b/app/views/static/privacy.html.erb
index 3457f7825a6..620b67512c2 100644
--- a/app/views/static/privacy.html.erb
+++ b/app/views/static/privacy.html.erb
@@ -1,4 +1,11 @@
-
We collect information from you when you register on our site and gather data when you participate in the forum by reading, writing, and evaluating the content shared here.
@@ -7,22 +14,25 @@ We collect information from you when you register on our site and gather data wh
When participating on our site, you may be asked to enter your: name, age and or e-mail address. You may, however, visit our site anonymously.
-
Any of the information we collect from you may be used in one of the following ways:
-
To personalize your experience - your information helps us to better respond to your individual needs.
-
To improve our site - we continually strive to improve our site offerings based on the information and feedback we receive from you.
-
To improve customer service - your information helps us to more effectively respond to your customer service requests and support needs.
-
To send periodic emails - The email address you provide may be used to send you information, notifications that you request about changes to topics or in response to your user name, respond to inquiries, and/or other requests or questions.
+
To personalize your experience — your information helps us to better respond to your individual needs.
+
To improve our site — we continually strive to improve our site offerings based on the information and feedback we receive from you.
+
To improve customer service — your information helps us to more effectively respond to your customer service requests and support needs.
+
To send periodic emails — The email address you provide may be used to send you information, notifications that you request about changes to topics or in response to your user name, respond to inquiries, and/or other requests or questions.
We implement a variety of security measures to maintain the safety of your personal
information when you enter, submit, or access your personal information.
Yes. Cookies are small files that a site or its service provider transfers to your computer's hard drive through your Web browser (if you allow) that enables the sites or service providers systems to recognize your browser and capture and remember certain information.
@@ -31,32 +41,38 @@ information when you enter, submit, or access your personal information.
We use cookies to understand and save your preferences for future visits and compile aggregate data about site traffic and site interaction so that we can offer better site experiences and tools in the future. We may contract with third-party service providers to assist us in better understanding our site visitors. These service providers are not permitted to use the information collected on our behalf except to help us conduct and improve our business.
-
Do we disclose any information to outside parties?
We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our site, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety. However, non-personally identifiable visitor information may be provided to other parties for marketing, advertising, or other uses.
Occasionally, at our discretion, we may include or offer third party products or services on our site. These third party sites have separate and independent privacy policies. We therefore have no responsibility or liability for the content and activities of these linked sites. Nonetheless, we seek to protect the integrity of our site and welcome any feedback about these sites.
-We are in compliance with the requirements of COPPA (Childrens Online Privacy Protection Act), we do not collect any information from anyone under 13 years of age. Our site, products and services are all directed to people who are at least 13 years old or older.
+We are in compliance with the requirements of COPPA (Children's Online Privacy Protection Act), we do not collect any information from anyone under 13 years of age. Our site, products and services are all directed to people who are at least 13 years old or older.
The following terms and conditions govern all use of the <%= @company_domain %> website and all content, services and products available at or through the website, including, but not limited to, <%= @company_domain %> Forum Software, <%= @company_domain %> Support Forums and the <%= @company_domain %> Hosting service (“Hosting”), (taken together, the Website). The Website is owned and operated by <%= @company_fullname %> (“<%= @company_shortname %>”). The Website is offered subject to your acceptance without modification of all of the terms and conditions contained herein and all other operating rules, policies (including, without limitation, <%= @company_domain %>’s Privacy Policy and Community Guidelines) and procedures that may be published from time to time on this Site by <%= @company_shortname %> (collectively, the “Agreement”).
@@ -6,36 +12,30 @@
Please read this Agreement carefully before accessing or using the Website. By accessing or using any part of the web site, you agree to become bound by the terms and conditions of this agreement. If you do not agree to all the terms and conditions of this agreement, then you may not access the Website or use any services. If these terms and conditions are considered an offer by <%= @company_shortname %>, acceptance is expressly limited to these terms. The Website is available only to individuals who are at least 13 years old.
-
If you create an account on the Website, you are responsible for maintaining the security of your account and you are fully responsible for all activities that occur under the account. You must immediately notify <%= @company_shortname %> of any unauthorized uses of your account or any other breaches of security. <%= @company_shortname %> will not be liable for any acts or omissions by you, including any damages of any kind incurred as a result of such acts or omissions.
If you post material to the Website, post links on the Website, or otherwise make (or allow any third party to make) material available by means of the Website (any such material, “Content”), You are entirely responsible for the content of, and any harm resulting from, that Content. That is the case regardless of whether the Content in question constitutes text, graphics, an audio file, or computer software. By making Content available, you represent and warrant that:
-
the downloading, copying and use of the Content will not infringe the proprietary rights, including but not limited to the copyright, patent, trademark or trade secret rights, of any third party;
-
if your employer has rights to intellectual property you create, you have either (i) received permission from your employer to post or make available the Content, including but not limited to any software, or (ii) secured from your employer a waiver as to all rights in or to the Content;
-
you have fully complied with any third-party licenses relating to the Content, and have done all things necessary to successfully pass through to end users any required terms;
-
the Content does not contain or install any viruses, worms, malware, Trojan horses or other harmful or destructive content;
-
the Content is not spam, is not machine- or randomly-generated, and does not contain unethical or unwanted commercial content designed to drive traffic to third party sites or boost the search engine rankings of third party sites, or to further unlawful acts (such as phishing) or mislead recipients as to the source of the material (such as spoofing);
-
the Content is not pornographic, does not contain threats or incite violence, and does not violate the privacy or publicity rights of any third party;
-
your content is not getting advertised via unwanted electronic messages such as spam links on newsgroups, email lists, blogs and web sites, and similar unsolicited promotional methods;
-
your content is not named in a manner that misleads your readers into thinking that you are another person or company; and
-
you have, in the case of Content that includes computer code, accurately categorized and/or described the type, nature, uses and effects of the materials, whether requested to do so by <%= @company_shortname %> or otherwise.
@@ -48,7 +48,8 @@
Without limiting any of those representations or warranties, <%= @company_shortname %> has the right (though not the obligation) to, in <%= @company_shortname %>’s sole discretion (i) refuse or remove any content that, in <%= @company_shortname %>’s reasonable opinion, violates any <%= @company_shortname %> policy or is in any way harmful or objectionable, or (ii) terminate or deny access to and use of the Website to any individual or entity for any reason, in <%= @company_shortname %>’s sole discretion. <%= @company_shortname %> will have no obligation to provide a refund of any amounts previously paid.
-
Optional paid services such as extra storage, or domain purchases are available on the Website (any such services, an “Upgrade”). By selecting an Upgrade you agree to pay <%= @company_shortname %> the monthly or annual subscription fees indicated for that service. Payments will be charged on a pre-pay basis on the day you sign up for an Upgrade and will cover the use of that service for a monthly or annual subscription period as indicated. Upgrade fees are not refundable.
@@ -57,67 +58,81 @@
Unless you notify <%= @company_shortname %> before the end of the applicable subscription period that you want to cancel an Upgrade, your Upgrade subscription will automatically renew and you authorize us to collect the then-applicable annual or monthly subscription fee for such Upgrade (as well as any taxes) using any credit card or other payment mechanism we have on record for you. Upgrades can be canceled at any time in the Upgrades section of your site’s dashboard.
Hosting and Support services are provided by <%= @company_shortname %> under the terms and conditions for each such service, which are located at /hosting-tos and /support-tos, respectively. By signing up for a Hosting/Support or Support services account, you agree to abide by such terms and conditions.
<%= @company_shortname %> has not reviewed, and cannot review, all of the material, including computer software, posted to the Website, and cannot therefore be responsible for that material’s content, use or effects. By operating the Website, <%= @company_shortname %> does not represent or imply that it endorses the material there posted, or that it believes such material to be accurate, useful or non-harmful. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. The Website may contain content that is offensive, indecent, or otherwise objectionable, as well as content containing technical inaccuracies, typographical mistakes, and other errors. The Website may also contain material that violates the privacy or publicity rights, or infringes the intellectual property and other proprietary rights, of third parties, or the downloading, copying or use of which is subject to additional terms and conditions, stated or unstated. <%= @company_shortname %> disclaims any responsibility for any harm resulting from the use by visitors of the Website, or from any downloading by those visitors of content there posted.
We have not reviewed, and cannot review, all of the material, including computer software, made available through the websites and webpages to which <%= @company_domain %> links, and that link to <%= @company_domain %>. <%= @company_shortname %> does not have any control over those non-<%= @company_domain %> websites and webpages, and is not responsible for their contents or their use. By linking to a non-<%= @company_domain %> website or webpage, <%= @company_shortname %> does not represent or imply that it endorses such website or webpage. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. <%= @company_shortname %> disclaims any responsibility for any harm resulting from your use of non-WordPress websites and webpages.
As <%= @company_shortname %> asks others to respect its intellectual property rights, it respects the intellectual property rights of others. If you believe that material located on or linked to by <%= @company_domain %> violates your copyright, you are encouraged to notify <%= @company_shortname %> in accordance with <%= @company_shortname %>’s Digital Millennium Copyright Act (“DMCA”) Policy. <%= @company_shortname %> will respond to all such notices, including as required or appropriate by removing the infringing material or disabling all links to the infringing material. <%= @company_shortname %> will terminate a visitor’s access to and use of the Website if, under appropriate circumstances, the visitor is determined to be a repeat infringer of the copyrights or other intellectual property rights of <%= @company_shortname %> or others. In the case of such termination, <%= @company_shortname %> will have no obligation to provide a refund of any amounts previously paid to <%= @company_shortname %>.
This Agreement does not transfer from <%= @company_shortname %> to you any <%= @company_shortname %> or third party intellectual property, and all right, title and interest in and to such property will remain (as between the parties) solely with <%= @company_shortname %>. <%= @company_shortname %>, <%= @company_domain %>, the <%= @company_domain %> logo, and all other trademarks, service marks, graphics and logos used in connection with <%= @company_domain %>, or the Website are trademarks or registered trademarks of <%= @company_shortname %> or <%= @company_shortname %>’s licensors. Other trademarks, service marks, graphics and logos used in connection with the Website may be the trademarks of other third parties. Your use of the Website grants you no right or license to reproduce or otherwise use any <%= @company_shortname %> or third-party trademarks.
<%= @company_shortname %> reserves the right to display advertisements on your content unless you have purchased an Ad-free Upgrade or a Services account.
<%= @company_shortname %> reserves the right to display attribution links such as ‘Powered by <%= @company_domain %>,’ theme author, and font attribution in your content footer or toolbar. Footer credits and the <%= @company_domain %> toolbar may not be removed regardless of upgrades purchased.
-
12. Changes
-
- <%= @company_shortname %> reserves the right, at its sole discretion, to modify or replace any part of this Agreement. It is your responsibility to check this Agreement periodically for changes. Your continued use of or access to the Website following the posting of any changes to this Agreement constitutes acceptance of those changes. <%= @company_shortname %> may also, in the future, offer new services and/or features through the Website (including, the release of new tools and resources). Such new features and/or services shall be subject to the terms and conditions of this Agreement.
-
+<%= @company_shortname %> reserves the right, at its sole discretion, to modify or replace any part of this Agreement. It is your responsibility to check this Agreement periodically for changes. Your continued use of or access to the Website following the posting of any changes to this Agreement constitutes acceptance of those changes. <%= @company_shortname %> may also, in the future, offer new services and/or features through the Website (including, the release of new tools and resources). Such new features and/or services shall be subject to the terms and conditions of this Agreement.
+
-
13. Termination
-
- <%= @company_shortname %> may terminate your access to all or any part of the Website at any time, with or without cause, with or without notice, effective immediately. If you wish to terminate this Agreement or your <%= @company_domain %> account (if you have one), you may simply discontinue using the Website. All provisions of this Agreement which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability.
-
+<%= @company_shortname %> may terminate your access to all or any part of the Website at any time, with or without cause, with or without notice, effective immediately. If you wish to terminate this Agreement or your <%= @company_domain %> account (if you have one), you may simply discontinue using the Website. All provisions of this Agreement which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability.
+
-
14.Disclaimer of Warranties.
-
- The Website is provided “as is”. <%= @company_shortname %> and its suppliers and licensors hereby disclaim all warranties of any kind, express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement. Neither <%= @company_shortname %> nor its suppliers and licensors, makes any warranty that the Website will be error free or that cess thereto will be continuous or uninterrupted. If you’re actually reading this, here’s a treat. You understand that you download from, or otherwise obtain content or services through, the Website at your own discretion and risk.
-
+The Website is provided “as is”. <%= @company_shortname %> and its suppliers and licensors hereby disclaim all warranties of any kind, express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement. Neither <%= @company_shortname %> nor its suppliers and licensors, makes any warranty that the Website will be error free or that cess thereto will be continuous or uninterrupted. If you’re actually reading this, here’s a treat. You understand that you download from, or otherwise obtain content or services through, the Website at your own discretion and risk.
+
-
15. Limitation of Liability.
-
- In no event will <%= @company_shortname %>, or its suppliers or licensors, be liable with respect to any subject matter of this agreement under any contract, negligence, strict liability or other legal or equitable theory for: (i) any special, incidental or consequential damages; (ii) the cost of procurement for substitute products or services; (iii) for interruption of use or loss or corruption of data; or (iv) for any amounts that exceed the fees paid by you to <%= @company_shortname %> under this agreement during the twelve (12) month period prior to the cause of action. <%= @company_shortname %> shall have no liability for any failure or delay due to matters beyond their reasonable control. The foregoing shall not apply to the extent prohibited by applicable law.
-
+In no event will <%= @company_shortname %>, or its suppliers or licensors, be liable with respect to any subject matter of this agreement under any contract, negligence, strict liability or other legal or equitable theory for: (i) any special, incidental or consequential damages; (ii) the cost of procurement for substitute products or services; (iii) for interruption of use or loss or corruption of data; or (iv) for any amounts that exceed the fees paid by you to <%= @company_shortname %> under this agreement during the twelve (12) month period prior to the cause of action. <%= @company_shortname %> shall have no liability for any failure or delay due to matters beyond their reasonable control. The foregoing shall not apply to the extent prohibited by applicable law.
+
-
16. General Representation and Warranty.
-
- You represent and warrant that (i) your use of the Website will be in strict accordance with the <%= @company_shortname %> Privacy Policy, Community Guidelines, with this Agreement and with all applicable laws and regulations (including without limitation any local laws or regulations in your country, state, city, or other governmental area, regarding online conduct and acceptable content, and including all applicable laws regarding the transmission of technical data exported from the United States or the country in which you reside) and (ii) your use of the Website will not infringe or misappropriate the intellectual property rights of any third party.
-
+You represent and warrant that (i) your use of the Website will be in strict accordance with the <%= @company_shortname %> Privacy Policy, Community Guidelines, with this Agreement and with all applicable laws and regulations (including without limitation any local laws or regulations in your country, state, city, or other governmental area, regarding online conduct and acceptable content, and including all applicable laws regarding the transmission of technical data exported from the United States or the country in which you reside) and (ii) your use of the Website will not infringe or misappropriate the intellectual property rights of any third party.
+
-
17.Indemnification
-
- You agree to indemnify and hold harmless <%= @company_shortname %>, its contractors, and its licensors, and their respective directors, officers, employees and agents from and against any and all claims and expenses, including attorneys’ fees, arising out of your use of the Website, including but not limited to your violation of this Agreement.
-
+You agree to indemnify and hold harmless <%= @company_shortname %>, its contractors, and its licensors, and their respective directors, officers, employees and agents from and against any and all claims and expenses, including attorneys’ fees, arising out of your use of the Website, including but not limited to your violation of this Agreement.
+
-
18. Miscellaneous
-
- This Agreement constitutes the entire agreement between <%= @company_shortname %> and you concerning the subject matter hereof, and they may only be modified by a written amendment signed by an authorized executive of <%= @company_shortname %>, or by the posting by <%= @company_shortname %> of a revised version. Except to the extent applicable law, if any, provides otherwise, this Agreement, any access to or use of the Website will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions, and the proper venue for any disputes arising out of or relating to any of the same will be the state and federal courts located in San Francisco County, California. Except for claims for injunctive or equitable relief or claims regarding intellectual property rights (which may be brought in any competent court without the posting of a bond), any dispute arising under this Agreement shall be finally settled in accordance with the Comprehensive Arbitration Rules of the Judicial Arbitration and Mediation Service, Inc. (“JAMS”) by three arbitrators appointed in accordance with such Rules. The arbitration shall take place in San Francisco, California, in the English language and the arbitral decision may be enforced in any court. The prevailing party in any action or proceeding to enforce this Agreement shall be entitled to costs and attorneys’ fees. If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the parties’ original intent, and the remaining portions will remain in full force and effect. A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms and conditions; <%= @company_shortname %> may assign its rights under this Agreement without condition. This Agreement will be binding upon and will inure to the benefit of the parties, their successors and permitted assigns.
-
+ This Agreement constitutes the entire agreement between <%= @company_shortname %> and you concerning the subject matter hereof, and they may only be modified by a written amendment signed by an authorized executive of <%= @company_shortname %>, or by the posting by <%= @company_shortname %> of a revised version. Except to the extent applicable law, if any, provides otherwise, this Agreement, any access to or use of the Website will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions, and the proper venue for any disputes arising out of or relating to any of the same will be the state and federal courts located in San Francisco County, California. Except for claims for injunctive or equitable relief or claims regarding intellectual property rights (which may be brought in any competent court without the posting of a bond), any dispute arising under this Agreement shall be finally settled in accordance with the Comprehensive Arbitration Rules of the Judicial Arbitration and Mediation Service, Inc. (“JAMS”) by three arbitrators appointed in accordance with such Rules. The arbitration shall take place in San Francisco, California, in the English language and the arbitral decision may be enforced in any court. The prevailing party in any action or proceeding to enforce this Agreement shall be entitled to costs and attorneys’ fees. If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the parties’ original intent, and the remaining portions will remain in full force and effect. A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms and conditions; <%= @company_shortname %> may assign its rights under this Agreement without condition. This Agreement will be binding upon and will inure to the benefit of the parties, their successors and permitted assigns.
+
\ No newline at end of file
From 702fbcdfa8bdc5f1ff2c982e89e32d2ade630c31 Mon Sep 17 00:00:00 2001
From: tms
Date: Sun, 17 Feb 2013 04:10:17 -0500
Subject: [PATCH 16/35] Oneboxes shouldn't explode when the remote causes an
HTTPError
---
lib/oneboxer.rb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/oneboxer.rb b/lib/oneboxer.rb
index d8542e07972..01b7da6adc2 100644
--- a/lib/oneboxer.rb
+++ b/lib/oneboxer.rb
@@ -42,7 +42,7 @@ module Oneboxer
end
(doc/"link[@type='text/json+oembed']").each do |oembed|
return OembedOnebox.new(oembed[:href]).onebox
- end
+ end
# Check for opengraph
open_graph = Oneboxer.parse_open_graph(doc)
@@ -50,7 +50,9 @@ module Oneboxer
end
end
- nil
+ nil
+ rescue OpenURI::HTTPError
+ nil
end
# Parse URLs out of HTML, returning the document when finished.
From 85b0c0afab16f118d0586f526596872f8d0f5985 Mon Sep 17 00:00:00 2001
From: tms
Date: Sun, 17 Feb 2013 04:31:21 -0500
Subject: [PATCH 17/35] Have oneboxer default to page title when og:title is
missing
---
lib/oneboxer/base.rb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/oneboxer/base.rb b/lib/oneboxer/base.rb
index fa0891e2310..2d1a160c157 100644
--- a/lib/oneboxer/base.rb
+++ b/lib/oneboxer/base.rb
@@ -8,6 +8,11 @@ module Oneboxer
node = doc.at("/html/head/meta[@property='og:#{prop}']")
result[prop] = (node['content'] || node['value']) if node
end
+
+ # If there's no title, try using the page's title
+ if result['title'].blank?
+ result['title'] = doc.title
+ end
# If there's no description, try and get one from the meta tags
if result['description'].blank?
From 20c723c4fbc39ceaae1bd58c0295760aa5ff991f Mon Sep 17 00:00:00 2001
From: tms
Date: Sun, 17 Feb 2013 15:26:47 -0500
Subject: [PATCH 18/35] Fancy 404 should require access too
---
app/controllers/exceptions_controller.rb | 1 -
1 file changed, 1 deletion(-)
diff --git a/app/controllers/exceptions_controller.rb b/app/controllers/exceptions_controller.rb
index 413807413f1..6014ebc9c47 100644
--- a/app/controllers/exceptions_controller.rb
+++ b/app/controllers/exceptions_controller.rb
@@ -1,6 +1,5 @@
class ExceptionsController < ApplicationController
skip_before_filter :check_xhr
- skip_before_filter :check_restricted_access
layout 'no_js'
def not_found
From 3c97cda8e44dac090f158268e5705a4550105483 Mon Sep 17 00:00:00 2001
From: Shawn Holmes
Date: Sun, 17 Feb 2013 14:11:57 -0700
Subject: [PATCH 19/35] Update docs/VAGRANT.md
- added a subsection for Windows users on what they need to do in lieu of 'vagrant ssh' not working on the Win platform.
---
docs/VAGRANT.md | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/docs/VAGRANT.md b/docs/VAGRANT.md
index 1d061229ea9..9b758479ee8 100644
--- a/docs/VAGRANT.md
+++ b/docs/VAGRANT.md
@@ -32,6 +32,28 @@ Once the machine has booted up, you can shell into it by typing:
vagrant ssh
```
+**Note to Windows users**: You cannot run ```vagrant ssh``` from a cmd prompt; you'll receive the error message:
+
+```
+`vagrant ssh` isn't available on the Windows platform. You are still able
+to SSH into the virtual machine if you get a Windows SSH client (such as
+PuTTY). The authentication information is shown below:
+
+Host: 127.0.0.1
+Port: 2222
+Username: vagrant
+Private key: C:/Users/Your Name/.vagrant.d/insecure_private_key
+```
+
+At this point, you will want to get an SSH client, and use it to connect to your Vagrant VM instead. We recommend
+PuTTY:
+
+**[PuTTY Download Link](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)**
+
+You may use this client to connect to the VM by using ```vagrant/vagrant``` as your username/password, or by [using
+PuTTYGen to import the insecure_private_key file](http://jason.sharonandjason.com/key_based_putty_logins_mini_how_to.htm)
+(mentioned above) into a PuTTY profile to quickly access your VM.
+
### Keeping your VM up to date
Now you're in a virtual machine is almost ready to start developing. It's a good idea to perform the following instructions
From ff0d58e4ee9e43f8ee4333f88ed1c3084b62a9d5 Mon Sep 17 00:00:00 2001
From: Sam Saffron
Date: Sat, 16 Feb 2013 12:14:52 +1100
Subject: [PATCH 20/35] message bus work in progress
---
config/initializers/message_bus.rb | 1 +
vendor/gems/message_bus/assets/application.js | 3 +-
vendor/gems/message_bus/assets/message-bus.js | 36 ++++++++++---------
vendor/gems/message_bus/lib/message_bus.rb | 6 ++++
.../lib/message_bus/rack/diagnostics.rb | 5 +--
5 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/config/initializers/message_bus.rb b/config/initializers/message_bus.rb
index a61d379e374..ad12cf1c7db 100644
--- a/config/initializers/message_bus.rb
+++ b/config/initializers/message_bus.rb
@@ -31,3 +31,4 @@ MessageBus.is_admin_lookup do |env|
end
MessageBus.cache_assets = !Rails.env.development?
+MessageBus.enable_diagnostics
diff --git a/vendor/gems/message_bus/assets/application.js b/vendor/gems/message_bus/assets/application.js
index 6f8f8302297..6347f926cef 100644
--- a/vendor/gems/message_bus/assets/application.js
+++ b/vendor/gems/message_bus/assets/application.js
@@ -1,5 +1,4 @@
-
window.App = Ember.Application.createWithMixins({
start: function(){
MessageBus.start();
@@ -29,7 +28,7 @@ App.IndexModel = Ember.Object.extend({
this.set("discovering", true);
Ember.run.later(function(){
_this.set("discovering", false);
- }, 20 * 1000);
+ }, 1 * 1000);
$.post("/message-bus/_diagnostics/discover");
diff --git a/vendor/gems/message_bus/assets/message-bus.js b/vendor/gems/message_bus/assets/message-bus.js
index 0b0be03805a..bec7c2344ef 100644
--- a/vendor/gems/message_bus/assets/message-bus.js
+++ b/vendor/gems/message_bus/assets/message-bus.js
@@ -30,6 +30,24 @@ window.MessageBus = (function() {
}
};
+ var processMessages = function(messages) {
+ failCount = 0;
+ $.each(messages,function(idx,message) {
+ gotData = true;
+ $.each(callbacks,function(idx,callback) {
+ if (callback.channel === message.channel) {
+ callback.last_id = message.message_id;
+ callback.func(message.data);
+ }
+ if (message["channel"] === "/__status") {
+ if (message.data[callback.channel] !== void 0) {
+ callback.last_id = message.data[callback.channel];
+ }
+ }
+ });
+ });
+ };
+
return {
enableLongPolling: true,
@@ -52,7 +70,7 @@ window.MessageBus = (function() {
return;
}
data = {};
- callbacks.each(function(c) {
+ $.each(callbacks, function(idx,c) {
return data[c.channel] = c.last_id === void 0 ? -1 : c.last_id;
});
gotData = false;
@@ -65,21 +83,7 @@ window.MessageBus = (function() {
'X-SILENCE-LOGGER': 'true'
},
success: function(messages) {
- failCount = 0;
- return messages.each(function(message) {
- gotData = true;
- return callbacks.each(function(callback) {
- if (callback.channel === message.channel) {
- callback.last_id = message.message_id;
- callback.func(message.data);
- }
- if (message["channel"] === "/__status") {
- if (message.data[callback.channel] !== void 0) {
- callback.last_id = message.data[callback.channel];
- }
- }
- });
- });
+ processMessages(messages);
},
error: failCount += 1,
complete: function() {
diff --git a/vendor/gems/message_bus/lib/message_bus.rb b/vendor/gems/message_bus/lib/message_bus.rb
index 72d859cd125..1948e74c778 100644
--- a/vendor/gems/message_bus/lib/message_bus.rb
+++ b/vendor/gems/message_bus/lib/message_bus.rb
@@ -125,6 +125,12 @@ module MessageBus::Implementation
@reliable_pub_sub ||= MessageBus::ReliablePubSub.new redis_config
end
+ def enable_diagnostics
+ subscribe('/discover') do |msg|
+ MessageBus.publish '/process-discovery', Process.pid, user_id: msg.data[:user_id]
+ end
+ end
+
def publish(channel, data, opts = nil)
return if @off
diff --git a/vendor/gems/message_bus/lib/message_bus/rack/diagnostics.rb b/vendor/gems/message_bus/lib/message_bus/rack/diagnostics.rb
index 6b1e4e59dd2..a286a4d5ebc 100644
--- a/vendor/gems/message_bus/lib/message_bus/rack/diagnostics.rb
+++ b/vendor/gems/message_bus/lib/message_bus/rack/diagnostics.rb
@@ -71,8 +71,9 @@ HTML
return index unless route
- if route == 'discover'
- MessageBus.publish('/discover', {user_id: MessageBus() })
+ if route == '/discover'
+ MessageBus.publish('/discover', {user_id: MessageBus.user_id_lookup.call(env)})
+ return [200, {}, ['ok']]
end
asset = route.split('/assets/')[1]
From c81d07c44b04ac72399913535b7fcdedf50aff6d Mon Sep 17 00:00:00 2001
From: Sam Saffron
Date: Sat, 16 Feb 2013 12:15:15 +1100
Subject: [PATCH 21/35] clean up the topics footer so it does not flash and is
localisable
---
.../discourse/controllers/list_controller.js.coffee | 1 +
.../discourse/routes/filtered_list_route.js.coffee | 3 +++
.../javascripts/discourse/templates/list/list.js.handlebars | 6 ++++--
config/locales/client.en.yml | 1 +
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/app/assets/javascripts/discourse/controllers/list_controller.js.coffee b/app/assets/javascripts/discourse/controllers/list_controller.js.coffee
index 4be14f1d9c2..987845cbab8 100644
--- a/app/assets/javascripts/discourse/controllers/list_controller.js.coffee
+++ b/app/assets/javascripts/discourse/controllers/list_controller.js.coffee
@@ -39,6 +39,7 @@ Discourse.ListController = Ember.Controller.extend Discourse.Presence,
Discourse.TopicList.list(current).then (items) =>
@set('filterSummary', items.filter_summary)
@set('filterMode', filterMode)
+ @set('allLoaded', true) unless items.more_topics_url
@set('loading', false)
deferred.resolve(items)
diff --git a/app/assets/javascripts/discourse/routes/filtered_list_route.js.coffee b/app/assets/javascripts/discourse/routes/filtered_list_route.js.coffee
index 660e54d9ee3..38da7920432 100644
--- a/app/assets/javascripts/discourse/routes/filtered_list_route.js.coffee
+++ b/app/assets/javascripts/discourse/routes/filtered_list_route.js.coffee
@@ -5,6 +5,9 @@ window.Discourse.FilteredListRoute = Discourse.Route.extend
listController = @controllerFor('list')
listController.set('canCreateTopic', false)
listController.set('filterMode', '')
+ listController.set('allLoaded', false)
+
+
renderTemplate: ->
@render 'listTopics', into: 'list', outlet: 'listView', controller: 'listTopics'
setupController: ->
diff --git a/app/assets/javascripts/discourse/templates/list/list.js.handlebars b/app/assets/javascripts/discourse/templates/list/list.js.handlebars
index 09942678948..b4a83d6f98b 100644
--- a/app/assets/javascripts/discourse/templates/list/list.js.handlebars
+++ b/app/assets/javascripts/discourse/templates/list/list.js.handlebars
@@ -35,8 +35,10 @@
{{/if}}
{{outlet listView}}
-
-