]> source.dussan.org Git - redmine.git/commitdiff
Merged r19325 from trunk to 4.1-stable (#31355, #32503).
authorGo MAEDA <maeda@farend.jp>
Mon, 2 Dec 2019 02:21:06 +0000 (02:21 +0000)
committerGo MAEDA <maeda@farend.jp>
Mon, 2 Dec 2019 02:21:06 +0000 (02:21 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19326 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index 952c2e58ae5ffcbf7fb8635c37d5ea08d0d204c4..e13825082aa9d2aae52eb51c0403e76376dc75a2 100644 (file)
@@ -472,8 +472,9 @@ module ApplicationHelper
 
   def render_projects_for_jump_box(projects, selected=nil)
     jump_box = Redmine::ProjectJumpBox.new User.current
-    bookmarked = jump_box.bookmarked_projects(params[:q])
-    recents = jump_box.recently_used_projects(params[:q])
+    query = params[:q] if request.format.js?
+    bookmarked = jump_box.bookmarked_projects(query)
+    recents = jump_box.recently_used_projects(query)
     projects = projects - (recents + bookmarked)
     projects_label = (bookmarked.any? || recents.any?) ? :label_optgroup_others : :label_project_plural
     jump = params[:jump].presence || current_menu_item