From 73ed8b9558a7da41178b4a03a6e07d7f032b614f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Apr 2015 17:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E7=AB=99=E6=90=9C=E7=B4=A2=E6=98=AF?= =?UTF-8?q?=E4=B8=8D=E8=BE=93=E5=85=A5=E6=9D=A1=E4=BB=B6=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 7033aa8f8..47cabbc6c 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -66,17 +66,20 @@ class FilesController < ApplicationController q = "%#{params[:name].strip}%" #(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank? if params[:insite] - @result = find_public_attache q,sort - @result = visable_attachemnts_insite @result,@course - @searched_attach = paginateHelper @result,10 + if q == "%%" + @result = [] + @searched_attach = paginateHelper @result,10 + else + @result = find_public_attache q,sort + @result = visable_attachemnts_insite @result,@course + @searched_attach = paginateHelper @result,10 + end else @result = find_course_attache q,@course,sort @result = visable_attachemnts @result @searched_attach = paginateHelper @result,10 + @tag_list = attachment_tag_list @result end - - @tag_list = attachment_tag_list @searched_attach - #rescue Exception => e # #render 'stores' # redirect_to search_course_files_url