diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index e9a8c788..daf7c39d 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -81,7 +81,7 @@ class DmsfFile < ActiveRecord::Base before_create :default_values def default_values - if (Setting.plugin_redmine_dmsf['dmsf_default_notifications'] == '1') && (!dmsf_folder || !dmsf_folder.system) + if Setting.plugin_redmine_dmsf['dmsf_default_notifications'].present? && (!dmsf_folder || !dmsf_folder.system) self.notification = true end end diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index 351ba636..7168616b 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -123,7 +123,7 @@ class DmsfFolder < ActiveRecord::Base end def default_values - if Setting.plugin_redmine_dmsf['dmsf_default_notifications'] == '1' && !system + if Setting.plugin_redmine_dmsf['dmsf_default_notifications'].present? && !system self.notification = true end end diff --git a/app/views/dmsf/_main.html.erb b/app/views/dmsf/_main.html.erb index ef26a2a4..ea84fd45 100644 --- a/app/views/dmsf/_main.html.erb +++ b/app/views/dmsf/_main.html.erb @@ -93,7 +93,7 @@ <% unless @folder && @folder.system %> <% other_formats_links do |f| %> <%= f.link_to 'CSV', url: { action: :show, id: @project, folder_id: @folder, encoding: Encoding::UTF_8 } if @project %> - <% if Setting.plugin_redmine_dmsf['dmsf_webdav'] == '1' %> + <% if Setting.plugin_redmine_dmsf['dmsf_webdav'].present? %> <%= link_to 'WebDAV', webdav_url(@project, @folder) %> diff --git a/app/views/dmsf_context_menus/_file.html.erb b/app/views/dmsf_context_menus/_file.html.erb index 263a910a..b2c288c2 100644 --- a/app/views/dmsf_context_menus/_file.html.erb +++ b/app/views/dmsf_context_menus/_file.html.erb @@ -67,7 +67,7 @@ ids: params[:ids], email_entries: true), method: :post, class: 'icon icon-email', disabled: !email_allowed %> -<% if Setting.plugin_redmine_dmsf['dmsf_webdav'] == '1' %> +<% if Setting.plugin_redmine_dmsf['dmsf_webdav'].present? %>