From 945d0a933f527337764393a6f0959071dffa1dfa Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 25 Jan 2016 17:34:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=B8=BA=E8=B4=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 1 - app/controllers/users_controller.rb | 6 ++++++ db/schema.rb | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index c7b4dc615..68386de44 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -29,7 +29,6 @@ class AdminController < ApplicationController def index @no_configuration_data = Redmine::DefaultData::Loader::no_data? - @lastest_login_user_count = User.all.count end def projects diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b155e9f90..8794808a3 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1633,6 +1633,9 @@ class UsersController < ApplicationController attach_copied_obj.attachtype = 1 end attach_copied_obj.save + unless Project.find(project_id).project_score.nil? + Project.find(project_id).project_score.update_attribute(:attach_num, Project.find(project_id).project_score.attach_num + 1) + end end end elsif params[:send_ids].present? @@ -1668,6 +1671,9 @@ class UsersController < ApplicationController attach_copied_obj.attachtype = 1 end attach_copied_obj.save + unless Project.find(project_id).project_score.nil? + Project.find(project_id).project_score.update_attribute(:attach_num, Project.find(project_id).project_score.attach_num + 1) + end end end end diff --git a/db/schema.rb b/db/schema.rb index b2c74a96c..8af34d878 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1371,6 +1371,7 @@ ActiveRecord::Schema.define(:version => 20160122143138) do t.integer "changeset_num", :default => 0 t.integer "board_message_num", :default => 0 t.integer "board_num", :default => 0 + t.integer "act_num", :default => 0 t.integer "attach_num", :default => 0 t.datetime "commit_time" end