Failed upgrade up to version 3.1.1 from version 3.0.12 #1472
This commit is contained in:
parent
8b41216517
commit
6a1985255f
2
Gemfile
2
Gemfile
@ -25,7 +25,9 @@ source 'https://rubygems.org' do
|
||||
gem 'ox' # Dav4Rack
|
||||
gem 'rake' unless Dir.exist?(File.expand_path('../../redmine_dashboard', __FILE__))
|
||||
gem 'uuidtools'
|
||||
group :xapian do
|
||||
gem 'xapian-ruby'
|
||||
end
|
||||
gem 'zip-zip' unless Dir.exist?(File.expand_path('../../vault', __FILE__))
|
||||
|
||||
# Redmine extensions
|
||||
|
||||
11
README.md
11
README.md
@ -220,6 +220,17 @@ instance is stopped.
|
||||
4. Install dependencies:
|
||||
|
||||
`bundle install`
|
||||
|
||||
4.1 In production environment
|
||||
|
||||
bundle config set --local without 'development test`
|
||||
bundle install
|
||||
|
||||
4.2 Without Xapian fulltext search (on Windows)
|
||||
|
||||
bundle config set --local without 'xapian'
|
||||
bundle install
|
||||
|
||||
5. Initialize/Update database:
|
||||
|
||||
`RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf`
|
||||
|
||||
@ -18,8 +18,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require 'xapian'
|
||||
require "#{File.dirname(__FILE__)}/../../lib/redmine_dmsf/lockable"
|
||||
require 'English'
|
||||
|
||||
@ -368,7 +366,7 @@ class DmsfFile < ApplicationRecord
|
||||
results = scope.where(find_options).uniq.to_a
|
||||
results.delete_if { |x| !DmsfFolder.permissions?(x.dmsf_folder) }
|
||||
|
||||
unless options[:titles_only]
|
||||
if !options[:titles_only] && RedmineDmsf::Plugin.xapian_available?
|
||||
database = nil
|
||||
begin
|
||||
lang = Setting.plugin_redmine_dmsf['dmsf_stemming_lang'].strip
|
||||
|
||||
@ -343,6 +343,15 @@
|
||||
</em>
|
||||
</p>
|
||||
<% else %>
|
||||
<% begin %>
|
||||
<% require 'xapian' %>
|
||||
<% xapian_disabled = false %>
|
||||
<% rescue LoadError => e %>
|
||||
<p class="warning"><%= l(:warning_xapian_not_available) %></p>
|
||||
<% Rails.logger.warn e.message %>
|
||||
<% xapian_disabled = true %>
|
||||
<% end %>
|
||||
<% if RedmineDmsf::Plugin.xapian_available? %>
|
||||
<p>
|
||||
<%= content_tag :label, l(:label_index_database) %>
|
||||
<%= text_field_tag 'settings[dmsf_index_database]', @settings['dmsf_index_database'], size: 50 %>
|
||||
@ -385,4 +394,7 @@
|
||||
<%= l(:text_enable_cjk_ngrams) %>
|
||||
</em>
|
||||
</p>
|
||||
<% else %>
|
||||
<p class="warning"><%= l(:warning_xapian_not_available) %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -180,6 +180,7 @@ cs:
|
||||
|
||||
error_file_can_not_be_created: Nelze vytvořit soubor v cílové složce
|
||||
error_wrong_zip_encoding: Chybné kódování Zipu
|
||||
warning_xapian_not_available: Xapian není k dostupný
|
||||
menu_dmsf: DMS # Project tab title
|
||||
label_physical_file_delete: Fyzické smazání souboru
|
||||
user_is_not_project_member: Nejste členem projektu
|
||||
|
||||
@ -177,6 +177,7 @@ de:
|
||||
erstellt werden.
|
||||
error_file_can_not_be_created: Datei kann nicht in dem gewählten Ordner erstellt werden.
|
||||
error_wrong_zip_encoding: Falsche ZIP-Kodierung
|
||||
warning_xapian_not_available: Xapian steht nicht zur Verfügung
|
||||
menu_dmsf: DMS # Project tab title
|
||||
label_physical_file_delete: Datei physisch löschen
|
||||
user_is_not_project_member: Sie sind kein Projektmitglied
|
||||
|
||||
@ -180,6 +180,7 @@ en:
|
||||
|
||||
error_file_can_not_be_created: "Files can't be created in storage directory"
|
||||
error_wrong_zip_encoding: Wrong Zip encoding
|
||||
warning_xapian_not_available: Xapian not available
|
||||
menu_dmsf: DMS # Project tab title
|
||||
label_physical_file_delete: Physical file delete
|
||||
user_is_not_project_member: You are not a member of the project
|
||||
|
||||
@ -180,6 +180,7 @@ es:
|
||||
|
||||
error_file_can_not_be_created: "El archivo no puede ser creado en el directorio destino"
|
||||
error_wrong_zip_encoding: Codificación erronea de Zip
|
||||
warning_xapian_not_available: Xapian no disponible
|
||||
menu_dmsf: DMS # Project tab title
|
||||
label_physical_file_delete: Eliminar archivos físicos
|
||||
user_is_not_project_member: No es miemo del proyecto
|
||||
|
||||
@ -174,6 +174,7 @@ fa:
|
||||
|
||||
error_file_can_not_be_created: "پروندهها نمیتوانند در پوشهی ذخیرهسازی ساخته شوند."
|
||||
error_wrong_zip_encoding: رمزگذاری اشتباه zip
|
||||
warning_xapian_not_available: Xapian در دسترس نیست
|
||||
menu_dmsf: اسناد پیشرفته # Project tab title
|
||||
label_physical_file_delete: پرونده فیزیکی حذف شود
|
||||
user_is_not_project_member: شما عضو این پروژه نیستید
|
||||
|
||||
@ -180,6 +180,7 @@ fr:
|
||||
créé
|
||||
error_file_can_not_be_created: "Le fichier n'a pas pu être enregistré dans le répertoire de stockage"
|
||||
error_wrong_zip_encoding: Mauvais jeu de caractères pour la transformation du nom du ZIP
|
||||
warning_xapian_not_available: Le module Xapian est indisponible
|
||||
menu_dmsf: DMS # Project tab title
|
||||
label_physical_file_delete: Suppression des fichiers
|
||||
user_is_not_project_member: "Vous n'êtes pas un membre du projet"
|
||||
|
||||
@ -180,6 +180,7 @@ hu:
|
||||
|
||||
error_file_can_not_be_created: A fájl nem hozható létre a tárolómappában
|
||||
error_wrong_zip_encoding: Nem megfelelő Zip kódolás
|
||||
warning_xapian_not_available: Xapian nem elérhető
|
||||
menu_dmsf: DMS # Project tab title
|
||||
label_physical_file_delete: Fizikai fájl törölve lett
|
||||
user_is_not_project_member: Ön nem tagja a csoportnak
|
||||
|
||||
@ -180,6 +180,7 @@ it: # Italian strings thx 2 Matteo Arceci!
|
||||
|
||||
error_file_can_not_be_created: "Il documento non può essere creato nella cartella di archiviazione"
|
||||
error_wrong_zip_encoding: Errato encoding dello Zip
|
||||
warning_xapian_not_available: Xapian non disponibile
|
||||
menu_dmsf: Documenti # Project tab title
|
||||
label_physical_file_delete: File fisico eliminato
|
||||
user_is_not_project_member: Non sei un membro del progetto
|
||||
|
||||
@ -180,6 +180,7 @@ ja:
|
||||
|
||||
error_file_can_not_be_created: ファイルを保存フォルダに作成できません
|
||||
error_wrong_zip_encoding: Zip エンコーディングが正しくありません
|
||||
warning_xapian_not_available: Xapian は利用できません
|
||||
menu_dmsf: 文書管理 # Project tab title
|
||||
label_physical_file_delete: 物理ファイルの削除
|
||||
user_is_not_project_member: あなたはプロジェクトのメンバーではありません
|
||||
|
||||
@ -180,6 +180,7 @@ ko:
|
||||
|
||||
error_file_can_not_be_created: 저장 공간에 파일을 생성할 수 없습니다
|
||||
error_wrong_zip_encoding: 올바르지 않은 Zip 인코딩
|
||||
warning_xapian_not_available: Xapian을 사용할 수 없습니다
|
||||
menu_dmsf: DMS
|
||||
label_physical_file_delete: 파일 삭제됨
|
||||
user_is_not_project_member: 이 프로젝트의 구성원이 아닙니다
|
||||
|
||||
@ -180,6 +180,7 @@ nl:
|
||||
|
||||
error_file_can_not_be_created: Bestand kan niet aangemaakt worden in opslag directory
|
||||
error_wrong_zip_encoding: Onjuiste Zip encoding
|
||||
warning_xapian_not_available: Xapian niet beschikbaar
|
||||
menu_dmsf: Easy DMS
|
||||
label_physical_file_delete: Fysiek bestand verwijderen
|
||||
user_is_not_project_member: U bent geen lid van het project
|
||||
|
||||
@ -179,6 +179,7 @@ pl:
|
||||
|
||||
error_file_can_not_be_created: "Plik nie może zostać utworzony w folderze przechowywania"
|
||||
error_wrong_zip_encoding: Złe kodowanie Zip
|
||||
warning_xapian_not_available: Xapian niedostępny
|
||||
menu_dmsf: DMS # Project tab title
|
||||
label_physical_file_delete: Fizyczne usuwanie plików
|
||||
user_is_not_project_member: Nie jesteś przypisany do tego projektu
|
||||
|
||||
@ -180,6 +180,7 @@ pt-BR:
|
||||
criado"
|
||||
error_file_can_not_be_created: "O arquivo não pode ser criado"
|
||||
error_wrong_zip_encoding: Código Zip errado
|
||||
warning_xapian_not_available: Xapian não disponível
|
||||
menu_dmsf: DMS
|
||||
label_physical_file_delete: Excluir fisicamente arquivo
|
||||
user_is_not_project_member: Você não é um membro do projeto
|
||||
|
||||
@ -180,6 +180,7 @@ sl:
|
||||
|
||||
error_file_can_not_be_created: Datoteke se ne da kreirat v mapi
|
||||
error_wrong_zip_encoding: Napačen Zip nabor znakov
|
||||
warning_xapian_not_available: Xapian ni na voljo
|
||||
menu_dmsf: Arhiv # Project tab title
|
||||
label_physical_file_delete: Brisanje datoteke (fizično)
|
||||
user_is_not_project_member: Niste član projekta
|
||||
|
||||
@ -181,6 +181,7 @@ uk:
|
||||
|
||||
error_file_can_not_be_created: "Неможливо створити файли в каталозі/директорії зберігання"
|
||||
error_wrong_zip_encoding: Неправильне Zip-кодування
|
||||
warning_xapian_not_available: Xapian not available
|
||||
menu_dmsf: DMS # Project tab title - Заголовок вкладки DMS # Project
|
||||
label_physical_file_delete: Фізичний файл видалено
|
||||
user_is_not_project_member: Ви не є учасником проекту
|
||||
|
||||
@ -180,6 +180,7 @@ zh-TW:
|
||||
|
||||
error_file_can_not_be_created: 在存儲目錄裡,無法建立檔案。
|
||||
error_wrong_zip_encoding: 不正確的Zip encoding
|
||||
warning_xapian_not_available: Xapian not available
|
||||
menu_dmsf: 文件總管 # Project tab title
|
||||
label_physical_file_delete: 永久刪除檔案
|
||||
user_is_not_project_member: 您不是專案的成員之一
|
||||
|
||||
@ -180,6 +180,7 @@ zh:
|
||||
|
||||
error_file_can_not_be_created: 文件未能在存储目录中创建
|
||||
error_wrong_zip_encoding: 不正确的Zip编码
|
||||
warning_xapian_not_available: Xapian not available
|
||||
menu_dmsf: 文档管家 # Project tab title
|
||||
label_physical_file_delete: 物理删除文件
|
||||
user_is_not_project_member: 您不是该项目的成员
|
||||
|
||||
@ -39,5 +39,14 @@ module RedmineDmsf
|
||||
end
|
||||
false
|
||||
end
|
||||
|
||||
# Return true if Xapian binding is installed (gem ruby_xapian)
|
||||
def self.xapian_available?
|
||||
require 'xapian'
|
||||
true
|
||||
rescue LoadError => e
|
||||
Rails.logger.warn e.message
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user