Skip to content

Commit

Permalink
* fixed Issue 168: MySQL Error in serarching within dmsf files.
Browse files Browse the repository at this point in the history
git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk@260 5e329b0b-a2ee-ea63-e329-299493fc886d
  • Loading branch information
vit.jonas@gmail.com committed Oct 13, 2011
1 parent cb0e643 commit 406c709
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redmine_dmsf/app/models/dmsf_file.rb
Expand Up @@ -248,7 +248,7 @@ def self.search(tokens, projects=nil, options={})

project_conditions = []
project_conditions << (Project.allowed_to_condition(User.current, :view_dmsf_files))
project_conditions << "project_id IN (#{projects.collect(&:id).join(',')})" unless projects.nil?
project_conditions << "#{DmsfFile.table_name}.project_id IN (#{projects.collect(&:id).join(',')})" unless projects.nil?

results = []
results_count = 0
Expand Down Expand Up @@ -305,7 +305,7 @@ def self.search(tokens, projects=nil, options={})
next unless results.select{|f| f.id.to_s == dmsf_attrs[1]}.empty?

find_conditions = DmsfFile.merge_conditions(limit_options[:conditions], :id => dmsf_attrs[1], :deleted => false )
dmsf_file = DmsfFile.find(:first, :conditions => find_conditions )
dmsf_file = DmsfFile.find(:first, :conditions => find_conditions )

if !dmsf_file.nil?
if options[:offset]
Expand Down

0 comments on commit 406c709

Please sign in to comment.