summaryrefslogtreecommitdiffstats
path: root/app/controllers/search_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-06-20 20:01:32 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-06-20 20:01:32 +0000
commit7376ef2ad73d71b8e60582d0dcbb2269be29da86 (patch)
tree81ac6a995efe5782c05f4f1e279c32643a665326 /app/controllers/search_controller.rb
parentc98f46d691542baf769bc74e25f808277cd5878b (diff)
downloadredmine-7376ef2ad73d71b8e60582d0dcbb2269be29da86.tar.gz
redmine-7376ef2ad73d71b8e60582d0dcbb2269be29da86.zip
Typecast issue ids when searched for.
Older Postgres versions don't allow searching over the id field's max size. Contributed by Holger Just git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3806 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r--app/controllers/search_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 0f0a4e6ae..f2e146b2f 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -43,7 +43,7 @@ class SearchController < ApplicationController
begin; offset = params[:offset].to_time if params[:offset]; rescue; end
# quick jump to an issue
- if @question.match(/^#?(\d+)$/) && Issue.visible.find_by_id($1)
+ if @question.match(/^#?(\d+)$/) && Issue.visible.find_by_id($1.to_i)
redirect_to :controller => "issues", :action => "show", :id => $1
return
end