diff options
Diffstat (limited to 'app/controllers/sys_controller.rb')
-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 |