From 8ef03b026f30b1fb5c4980a92787b1a64c8013d5 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Fri, 3 Jun 2016 10:45:21 +0200 Subject: [PATCH] Modified timestamps lost after migration #532 --- app/controllers/dmsf_controller.rb | 1 - lib/tasks/dmsf_convert_documents.rake | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 9d06bc9b..bf724030 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -42,7 +42,6 @@ class DmsfController < ApplicationController @workflows_available = DmsfWorkflow.where(['project_id = ? OR project_id IS NULL', @project.id]).count > 0 @file_approval_allowed = User.current.allowed_to?(:file_approval, @project) tag = params[:custom_field_id].present? && params[:custom_value].present? - #@tree_view = (User.current.pref[:dmsf_tree_view] == '1') && (!%w(atom xml json).include?(params[:format])) && !tag @folder = nil if tag if @tree_view @locked_for_user = false diff --git a/lib/tasks/dmsf_convert_documents.rake b/lib/tasks/dmsf_convert_documents.rake index 595661a6..30f7a61e 100644 --- a/lib/tasks/dmsf_convert_documents.rake +++ b/lib/tasks/dmsf_convert_documents.rake @@ -31,6 +31,7 @@ Available options: Example: rake redmine:dmsf_convert_documents project=test RAILS_ENV="production" + rake redmine:dmsf_convert_documents project=test dry=true RAILS_ENV="production" END_DESC class DmsfConvertDocuments @@ -111,7 +112,7 @@ class DmsfConvertDocuments begin file = DmsfFile.new file.project = project - file.folder = folder + file.dmsf_folder = folder file.name = attachment.filename i = 1 @@ -142,7 +143,7 @@ class DmsfConvertDocuments end revision = DmsfFileRevision.new - revision.file = file + revision.dmsf_file = file revision.name = file.name revision.title = DmsfFileRevision.filename_to_title(attachment.filename) revision.description = attachment.description