diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-13 16:31:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-13 16:31:11 +0000 |
commit | cc643ce932b2abdc56c4d1933c02806ca57ddefa (patch) | |
tree | eeaaba02f0eee8ce2d06a10609ccffebdfb1ee4d /app/controllers | |
parent | 6ef6459630cfd8fd5af31d527c0043243ef2cb09 (diff) | |
download | redmine-cc643ce932b2abdc56c4d1933c02806ca57ddefa.tar.gz redmine-cc643ce932b2abdc56c4d1933c02806ca57ddefa.zip |
Merged nbc branch @ r1812 (commit access permission and reposman improvements).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1814 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/sys_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb index 6065c2833..8aff3bd15 100644 --- a/app/controllers/sys_controller.rb +++ b/app/controllers/sys_controller.rb @@ -23,18 +23,17 @@ class SysController < ActionController::Base before_invocation :check_enabled # Returns the projects list, with their repositories - def projects - Project.find(:all, :include => :repository) + def projects_with_repository_enabled + Project.has_module(:repository).find(:all, :include => :repository, :order => 'identifier') end # Registers a repository for the given project identifier - # (Subversion specific) - def repository_created(identifier, url) + def repository_created(identifier, vendor, url) project = Project.find_by_identifier(identifier) # Do not create the repository if the project has already one return 0 unless project && project.repository.nil? logger.debug "Repository for #{project.name} was created" - repository = Repository.factory('Subversion', :project => project, :url => url) + repository = Repository.factory(vendor, :project => project, :url => url) repository.save repository.id || 0 end |