From c709545809bdac8a170453042a442b8464fbde5f Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 4 Jul 2014 16:55:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=90=8E=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=89=8D=E5=88=B7=E6=96=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=A7=AF=E5=88=86=E9=97=AE=E9=A2=98=EF=BC=88=E5=B0=9A?= =?UTF-8?q?=E9=9C=80=E6=B5=8B=E8=AF=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index b357ac44..92186710 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|