app/controllers/manifestations_controller.rb in enju_biblio-0.1.0.pre3 vs app/controllers/manifestations_controller.rb in enju_biblio-0.1.0.pre4

- old
+ new

@@ -199,20 +199,20 @@ if @series_statement flash.keep(:search_query) else flash[:search_query] = @search_query @manifestation_ids = search.build do - paginate :page => 1, :per_page => configatron.max_number_of_results + paginate :page => 1, :per_page => Setting.max_number_of_results end.execute.raw_results.collect(&:primary_key).map{|id| id.to_i} end end if defined?(EnjuBookmark) if params[:view] == 'tag_cloud' unless @manifestation_ids @manifestation_ids = search.build do - paginate :page => 1, :per_page => configatron.max_number_of_results + paginate :page => 1, :per_page => Setting.max_number_of_results end.execute.raw_results.collect(&:primary_key).map{|id| id.to_i} end #bookmark_ids = Bookmark.where(:manifestation_id => flash[:manifestation_ids]).limit(1000).pluck(:id) bookmark_ids = Bookmark.where(:manifestation_id => @manifestation_ids).limit(1000).pluck(:id) @tags = Tag.bookmarked(bookmark_ids) @@ -235,12 +235,12 @@ facet :subject_ids if defined?(EnjuSubject) paginate :page => page.to_i, :per_page => per_page end end search_result = search.execute - if @count[:query_result] > configatron.max_number_of_results - max_count = configatron.max_number_of_results + if @count[:query_result] > Setting.max_number_of_results + max_count = Setting.max_number_of_results else max_count = @count[:query_result] end @manifestations = Kaminari.paginate_array( search_result.results, :total_count => max_count @@ -364,11 +364,11 @@ if defined?(EnjuQuestion) @questions = @manifestation.questions(:user => current_user, :page => params[:question_page]) end if @manifestation.attachment.path - if configatron.uploaded_file.storage == :s3 + if Setting.uploaded_file.storage == :s3 data = open(@manifestation.attachment.url).read.force_encoding('UTF-8') else file = @manifestation.attachment.path end end @@ -390,10 +390,10 @@ format.json { render :json => @manifestation } #format.atom { render :template => 'manifestations/oai_ore' } #format.js format.download { if @manifestation.attachment.path - if configatron.uploaded_file.storage == :s3 + if Setting.uploaded_file.storage == :s3 send_data @manifestation.attachment.data, :filename => File.basename(@manifestation.attachment_file_name), :type => 'application/octet-stream' else if File.exist?(file) and File.file?(file) send_file file, :filename => File.basename(@manifestation.attachment_file_name), :type => 'application/octet-stream' end