diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index b357ac44f..92186710c 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -42,7 +42,7 @@ class ProjectsController < ApplicationController before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches] before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar] before_filter :file, :statistics, :watcherlist - + before_filter :find_project_repository, :only => [:show] # 除非项目内人员,不可查看成员, TODO: 完了写报表里去 before_filter :memberAccess, only: :member @@ -78,6 +78,14 @@ class ProjectsController < ApplicationController ### added by william include ActsAsTaggableOn::TagsHelper + def find_project_repository + unless @project.repositories.nil? + @project.repositories.each do |repository| + repository.fetch_changesets if Setting.autofetch_changesets? + end + end + end + def enterprise_course session[:enterprise_college] = 2 respond_to do |format|