Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync between branches/repos - merge missing commits from sourceforge for 'stable-2.7' branch #52

Open
wants to merge 8 commits into
base: stable-2.7
Choose a base branch
from
Next Next commit
deprecated method calls replaced
  • Loading branch information
sv3nk66 committed Dec 17, 2011
commit c26a4dfb247184c294745256ed645562e162d099
4 changes: 2 additions & 2 deletions app/controllers/mylyn_connector/issues_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/mylyn_connector/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/mylyn_connector/queries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down