From e71b002438be3ab511d840b27c2240f7de32341d Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 20 Mar 2013 15:37:34 +0800 Subject: [PATCH] Fix archive front end query for multiple categories --- .../panel/archive/front_end/archive_files_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb index 8c5410d8..2e37a970 100644 --- a/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb +++ b/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb @@ -23,12 +23,12 @@ class Panel::Archive::FrontEnd::ArchiveFilesController < OrbitWidgetController @tag = ArchiveTag.find(params[:tag_id]) rescue nil @tag = ArchiveTag.where(key: params[:tag_id])[0] unless @tag @archive_files = @tag.archive_files.can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) - @archive_files = @archive_files.can_display.where(:archive_file_category_id => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) + @archive_files = @archive_files.can_display.where(:archive_file_category_id.in => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil elsif !params[:category_id].blank? - @archive_files = ArchiveFile.can_display.where(:archive_file_category_id => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) + @archive_files = ArchiveFile.can_display.where(:archive_file_category_id.in => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil elsif !params[:tag_id].blank? @tag = ArchiveTag.find(params[:tag_id]) rescue nil