Permalink
Browse files

deprecated method calls replaced

  • Loading branch information...
1 parent 3892b53 commit c26a4dfb247184c294745256ed645562e162d099 Sven Krzyzak committed Dec 17, 2011
@@ -60,7 +60,7 @@ def updated_since
@issues = Issue.find(
:all,
:joins => ["join #{Project.table_name} on project_id=#{Project.table_name}.id"],
- :conditions => ["#{Issue.table_name}.id in (?) and #{Issue.table_name}.updated_on >= ? and " << Project.visible_by, issues, cond]
+ :conditions => ["#{Issue.table_name}.id in (?) and #{Issue.table_name}.updated_on >= ? and " << Project.visible_condition(User.current), issues, cond]
)
respond_to do |format|
format.xml {render :layout => false}
@@ -76,7 +76,7 @@ def list
@issues = Issue.find(
:all,
:joins => ["join #{Project.table_name} on project_id=#{Project.table_name}.id"],
- :conditions => ["#{Issue.table_name}.id in (?) and " << Project.visible_by, issues]
+ :conditions => ["#{Issue.table_name}.id in (?) and " << Project.visible_condition(User.current), issues]
)
respond_to do |format|
format.xml {render :layout => false}
@@ -13,7 +13,7 @@ class MylynConnector::ProjectsController < MylynConnector::ApplicationController
def all
@projects = Project.find(:all,
:joins => :enabled_modules,
- :conditions => [ "enabled_modules.name = 'issue_tracking' AND #{Project.visible_by}"])
+ :conditions => [ "enabled_modules.name = 'issue_tracking' AND #{Project.visible_condition(User.current)}"])
respond_to do |format|
format.xml {render :layout => false}
@@ -15,7 +15,7 @@ def all
@queries = Query.find(
:all,
:joins => ["left join #{Project.table_name} on project_id=#{Project.table_name}.id"],
- :conditions => ["(#{Query.table_name}.is_public = ? OR #{Query.table_name}.user_id = ?) AND (project_id IS NULL OR " << Project.visible_by << ")", true, User.current.id],
+ :conditions => ["(#{Query.table_name}.is_public = ? OR #{Query.table_name}.user_id = ?) AND (project_id IS NULL OR " << Project.visible_condition(User.current) << ")", true, User.current.id],
:order => "#{Query.table_name}.name ASC"
)

0 comments on commit c26a4df

Please sign in to comment.