X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bbf30e76e4bfcd70e62fc84ecd32c5e494506e9e..c9fa49c99485b0ba1242c6d13e12df9ab1532987:/app/controllers/diary_entry_controller.rb diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 6c7c9658b..13a8818fb 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -71,7 +71,7 @@ class DiaryEntryController < ApplicationController def list if params[:display_name] - @this_user = User.find_by_display_name(params[:display_name], :conditions => { :visible => true }) + @this_user = User.find_by_display_name(params[:display_name], :conditions => { :status => ["active", "confirmed"] }) if @this_user @title = t 'diary_entry.list.user_title', :user => @this_user.display_name @@ -92,7 +92,7 @@ class DiaryEntryController < ApplicationController @title = t 'diary_entry.list.in_language_title', :language => Language.find(params[:language]).english_name @entry_pages, @entries = paginate(:diary_entries, :include => :user, :conditions => { - :users => { :visible => true }, + :users => { :status => ["active", "confirmed"] }, :visible => true, :language_code => params[:language] }, @@ -102,7 +102,7 @@ class DiaryEntryController < ApplicationController @title = t 'diary_entry.list.title' @entry_pages, @entries = paginate(:diary_entries, :include => :user, :conditions => { - :users => { :visible => true }, + :users => { :status => ["active", "confirmed"] }, :visible => true }, :order => 'created_at DESC', @@ -111,10 +111,8 @@ class DiaryEntryController < ApplicationController end def rss - request.format = :rss - if params[:display_name] - user = User.find_by_display_name(params[:display_name], :conditions => { :visible => true }) + user = User.find_by_display_name(params[:display_name], :conditions => { :status => ["active", "confirmed"] }) if user @entries = DiaryEntry.find(:all, @@ -133,7 +131,7 @@ class DiaryEntryController < ApplicationController elsif params[:language] @entries = DiaryEntry.find(:all, :include => :user, :conditions => { - :users => { :visible => true }, + :users => { :status => ["active", "confirmed"] }, :visible => true, :language_code => params[:language] }, @@ -145,7 +143,7 @@ class DiaryEntryController < ApplicationController else @entries = DiaryEntry.find(:all, :include => :user, :conditions => { - :users => { :visible => true }, + :users => { :status => ["active", "confirmed"] }, :visible => true }, :order => 'created_at DESC', @@ -157,7 +155,7 @@ class DiaryEntryController < ApplicationController end def view - user = User.find_by_display_name(params[:display_name], :conditions => { :visible => true }) + user = User.find_by_display_name(params[:display_name], :conditions => { :status => ["active", "confirmed"] }) if user @entry = DiaryEntry.find(:first, :conditions => {