Commit 6bc2c9c523ef756dda2b37d46aa118844fcb4ff0

Authored by Antonio Terceiro
2 parents 6af27911 71728d99

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
app/controllers/public/content_viewer_controller.rb
@@ -216,8 +216,6 @@ class ContentViewerController < ApplicationController @@ -216,8 +216,6 @@ class ContentViewerController < ApplicationController
216 if @page.has_posts? 216 if @page.has_posts?
217 posts = get_posts(params[:year], params[:month]) 217 posts = get_posts(params[:year], params[:month])
218 218
219 - posts = posts.includes(:parent, {:profile => [:domains, :environment]}, :author)  
220 -  
221 #FIXME Need to run this before the pagination because this version of 219 #FIXME Need to run this before the pagination because this version of
222 # will_paginate returns a will_paginate collection instead of a 220 # will_paginate returns a will_paginate collection instead of a
223 # relation. 221 # relation.
config/initializers/newrelic.rb 0 → 100644
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +# Load newrelic agent if its config file is defined.
  2 +require 'newrelic_rpm' if File.exist?(File.dirname(__FILE__) + '/../newrelic.yml')
db/migrate/20140708115518_index_domains_filtered_fields.rb 0 → 100644
@@ -0,0 +1,10 @@ @@ -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 @@ @@ -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 @@ @@ -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
@@ -101,6 +101,8 @@ ActiveRecord::Schema.define(:version =&gt; 20140827191326) do @@ -101,6 +101,8 @@ ActiveRecord::Schema.define(:version =&gt; 20140827191326) do
101 end 101 end
102 102
103 add_index "article_versions", ["article_id"], :name => "index_article_versions_on_article_id" 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 create_table "articles", :force => true do |t| 107 create_table "articles", :force => true do |t|
106 t.string "name" 108 t.string "name"
@@ -153,9 +155,14 @@ ActiveRecord::Schema.define(:version =&gt; 20140827191326) do @@ -153,9 +155,14 @@ ActiveRecord::Schema.define(:version =&gt; 20140827191326) do
153 add_index "articles", ["hits"], :name => "index_articles_on_hits" 155 add_index "articles", ["hits"], :name => "index_articles_on_hits"
154 add_index "articles", ["name"], :name => "index_articles_on_name" 156 add_index "articles", ["name"], :name => "index_articles_on_name"
155 add_index "articles", ["parent_id"], :name => "index_articles_on_parent_id" 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 add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" 160 add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id"
157 add_index "articles", ["slug"], :name => "index_articles_on_slug" 161 add_index "articles", ["slug"], :name => "index_articles_on_slug"
158 add_index "articles", ["translation_of_id"], :name => "index_articles_on_translation_of_id" 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 create_table "articles_categories", :id => false, :force => true do |t| 167 create_table "articles_categories", :id => false, :force => true do |t|
161 t.integer "article_id" 168 t.integer "article_id"
@@ -277,6 +284,11 @@ ActiveRecord::Schema.define(:version =&gt; 20140827191326) do @@ -277,6 +284,11 @@ ActiveRecord::Schema.define(:version =&gt; 20140827191326) do
277 t.string "google_maps_key" 284 t.string "google_maps_key"
278 end 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 create_table "environments", :force => true do |t| 292 create_table "environments", :force => true do |t|
281 t.string "name" 293 t.string "name"
282 t.string "contact_email" 294 t.string "contact_email"
debian/changelog
@@ -10,6 +10,12 @@ noosfero (0.99.0~rc20140618202455) wheezy-test; urgency=low @@ -10,6 +10,12 @@ noosfero (0.99.0~rc20140618202455) wheezy-test; urgency=low
10 10
11 -- Rodrigo Souto <rodrigo@colivre.coop.br> Wed, 18 Jun 2014 20:25:01 +0000 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 noosfero (0.47.3) unstable; urgency=low 19 noosfero (0.47.3) unstable; urgency=low
14 20
15 * Bugfixes release 21 * Bugfixes release
lib/acts_as_having_posts.rb
@@ -22,7 +22,7 @@ module ActsAsHavingPosts @@ -22,7 +22,7 @@ module ActsAsHavingPosts
22 end 22 end
23 23
24 def feed 24 def feed
25 - self.children.find(:first, :conditions => {:type => 'RssFeed'}) 25 + Article.where(:parent_id => self.id).where(:type => 'RssFeed').first
26 end 26 end
27 27
28 def feed=(attrs) 28 def feed=(attrs)
plugins/sub_organizations/public/style.css
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 margin: 10px 0; 33 margin: 10px 0;
34 } 34 }
35 35
36 -#main-content-wrapper-8 ul{ 36 +.related-organizations-list-block ul{
37 padding-left: 0; 37 padding-left: 0;
38 } 38 }
39 39