Commit 6bc2c9c523ef756dda2b37d46aa118844fcb4ff0
Exists in
master
and in
22 other branches
Merge branch 'stable' into stable-merge
Conflicts: AUTHORS app/controllers/public/content_viewer_controller.rb debian/changelog lib/noosfero.rb po/de/noosfero.po po/eo/noosfero.po po/es/noosfero.po po/fr/noosfero.po po/hy/noosfero.po po/it/noosfero.po po/noosfero.pot po/pt/noosfero.po po/ru/noosfero.po
Showing
9 changed files
with
57 additions
and
4 deletions
Show diff stats
app/controllers/public/content_viewer_controller.rb
... | ... | @@ -216,8 +216,6 @@ class ContentViewerController < ApplicationController |
216 | 216 | if @page.has_posts? |
217 | 217 | posts = get_posts(params[:year], params[:month]) |
218 | 218 | |
219 | - posts = posts.includes(:parent, {:profile => [:domains, :environment]}, :author) | |
220 | - | |
221 | 219 | #FIXME Need to run this before the pagination because this version of |
222 | 220 | # will_paginate returns a will_paginate collection instead of a |
223 | 221 | # relation. | ... | ... |
db/migrate/20140708115518_index_domains_filtered_fields.rb
0 → 100644
... | ... | @@ -0,0 +1,10 @@ |
1 | +class IndexDomainsFilteredFields < ActiveRecord::Migration | |
2 | + | |
3 | + def self.up | |
4 | + add_index :domains, [:name] | |
5 | + add_index :domains, [:is_default] | |
6 | + add_index :domains, [:owner_id, :owner_type] | |
7 | + add_index :domains, [:owner_id, :owner_type, :is_default] | |
8 | + end | |
9 | + | |
10 | +end | ... | ... |
db/migrate/20140708121356_index_articles_filtered_fields.rb
0 → 100644
... | ... | @@ -0,0 +1,12 @@ |
1 | +class IndexArticlesFilteredFields < ActiveRecord::Migration | |
2 | + def self.up | |
3 | + %w[articles article_versions].each do |table| | |
4 | + add_index table, [:path] | |
5 | + add_index table, [:path, :profile_id] | |
6 | + end | |
7 | + add_index :articles, [:type] | |
8 | + add_index :articles, [:type, :parent_id] | |
9 | + add_index :articles, [:type, :profile_id] | |
10 | + end | |
11 | + | |
12 | +end | ... | ... |
db/migrate/20140724180943_add_index_to_blog_posts_sort.rb
0 → 100644
... | ... | @@ -0,0 +1,13 @@ |
1 | +class AddIndexToBlogPostsSort < ActiveRecord::Migration | |
2 | + def self.up | |
3 | + %w[articles article_versions].each do |table| | |
4 | + add_index table, [:published_at, :id] | |
5 | + end | |
6 | + end | |
7 | + | |
8 | + def self.down | |
9 | + %w[articles article_versions].each do |table| | |
10 | + remove_index table, [:published_at, :id] | |
11 | + end | |
12 | + end | |
13 | +end | ... | ... |
db/schema.rb
... | ... | @@ -101,6 +101,8 @@ ActiveRecord::Schema.define(:version => 20140827191326) do |
101 | 101 | end |
102 | 102 | |
103 | 103 | add_index "article_versions", ["article_id"], :name => "index_article_versions_on_article_id" |
104 | + add_index "article_versions", ["path", "profile_id"], :name => "index_article_versions_on_path_and_profile_id" | |
105 | + add_index "article_versions", ["path"], :name => "index_article_versions_on_path" | |
104 | 106 | |
105 | 107 | create_table "articles", :force => true do |t| |
106 | 108 | t.string "name" |
... | ... | @@ -153,9 +155,14 @@ ActiveRecord::Schema.define(:version => 20140827191326) do |
153 | 155 | add_index "articles", ["hits"], :name => "index_articles_on_hits" |
154 | 156 | add_index "articles", ["name"], :name => "index_articles_on_name" |
155 | 157 | add_index "articles", ["parent_id"], :name => "index_articles_on_parent_id" |
158 | + add_index "articles", ["path", "profile_id"], :name => "index_articles_on_path_and_profile_id" | |
159 | + add_index "articles", ["path"], :name => "index_articles_on_path" | |
156 | 160 | add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" |
157 | 161 | add_index "articles", ["slug"], :name => "index_articles_on_slug" |
158 | 162 | add_index "articles", ["translation_of_id"], :name => "index_articles_on_translation_of_id" |
163 | + add_index "articles", ["type", "parent_id"], :name => "index_articles_on_type_and_parent_id" | |
164 | + add_index "articles", ["type", "profile_id"], :name => "index_articles_on_type_and_profile_id" | |
165 | + add_index "articles", ["type"], :name => "index_articles_on_type" | |
159 | 166 | |
160 | 167 | create_table "articles_categories", :id => false, :force => true do |t| |
161 | 168 | t.integer "article_id" |
... | ... | @@ -277,6 +284,11 @@ ActiveRecord::Schema.define(:version => 20140827191326) do |
277 | 284 | t.string "google_maps_key" |
278 | 285 | end |
279 | 286 | |
287 | + add_index "domains", ["is_default"], :name => "index_domains_on_is_default" | |
288 | + add_index "domains", ["name"], :name => "index_domains_on_name" | |
289 | + add_index "domains", ["owner_id", "owner_type", "is_default"], :name => "index_domains_on_owner_id_and_owner_type_and_is_default" | |
290 | + add_index "domains", ["owner_id", "owner_type"], :name => "index_domains_on_owner_id_and_owner_type" | |
291 | + | |
280 | 292 | create_table "environments", :force => true do |t| |
281 | 293 | t.string "name" |
282 | 294 | t.string "contact_email" | ... | ... |
debian/changelog
... | ... | @@ -10,6 +10,12 @@ noosfero (0.99.0~rc20140618202455) wheezy-test; urgency=low |
10 | 10 | |
11 | 11 | -- Rodrigo Souto <rodrigo@colivre.coop.br> Wed, 18 Jun 2014 20:25:01 +0000 |
12 | 12 | |
13 | +noosfero (0.47.4) unstable; urgency=low | |
14 | + | |
15 | + * Bugfixes and performance optimizations | |
16 | + | |
17 | + -- Rodrigo Souto <rodrigo@colivre.coop.br> Thu, 21 Aug 2014 19:25:37 +0000 | |
18 | + | |
13 | 19 | noosfero (0.47.3) unstable; urgency=low |
14 | 20 | |
15 | 21 | * Bugfixes release | ... | ... |
lib/acts_as_having_posts.rb