diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 95fbed1d3..730546aa6 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -862,7 +862,7 @@ class ProjectsController < ApplicationController if params[:project][:is_public] == '0' project_status = ProjectStatus.find_by_project_id(@project.id) - project_status.destroy + project_status.destroy if project_status elsif params[:project][:is_public] == '1' project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => @project.watchers.count, :changesets_count => @project.changesets.count,:grade => 0, :project_type => @project.project_type) end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index d566c9b86..5e8eef074 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -17,7 +17,7 @@ class WelcomeController < ApplicationController caches_action :robots - before_filter :fake, :only => [:index, :course] + # before_filter :fake, :only => [:index, :course] before_filter :entry_select_course, :entry_select_contest, :entry_select_user, :only => [:index] def index diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index cfaba8749..98befd091 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,14 +1,14 @@ -<%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>文件共享专区 +<%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区