##// END OF EJS Templates
Remove instance variable which is unused after r9603 (#24832)....
Jean-Philippe Lang -
r15816:bef55bf1ab36
parent child
Show More
@@ -1,88 +1,87
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2016 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 class AdminController < ApplicationController
19 19 layout 'admin'
20 20 self.main_menu = false
21 21 menu_item :projects, :only => :projects
22 22 menu_item :plugins, :only => :plugins
23 23 menu_item :info, :only => :info
24 24
25 25 before_action :require_admin
26 26 helper :sort
27 27 include SortHelper
28 28
29 29 def index
30 30 @no_configuration_data = Redmine::DefaultData::Loader::no_data?
31 31 end
32 32
33 33 def projects
34 34 @status = params[:status] || 1
35 35
36 36 scope = Project.status(@status).sorted
37 37 scope = scope.like(params[:name]) if params[:name].present?
38 38
39 39 @project_count = scope.count
40 40 @project_pages = Paginator.new @project_count, per_page_option, params['page']
41 41 @projects = scope.limit(@project_pages.per_page).offset(@project_pages.offset).to_a
42 42
43 43 render :action => "projects", :layout => false if request.xhr?
44 44 end
45 45
46 46 def plugins
47 47 @plugins = Redmine::Plugin.all
48 48 end
49 49
50 50 # Loads the default configuration
51 51 # (roles, trackers, statuses, workflow, enumerations)
52 52 def default_configuration
53 53 if request.post?
54 54 begin
55 55 Redmine::DefaultData::Loader::load(params[:lang])
56 56 flash[:notice] = l(:notice_default_data_loaded)
57 57 rescue Exception => e
58 58 flash[:error] = l(:error_can_t_load_default_data, ERB::Util.h(e.message))
59 59 end
60 60 end
61 61 redirect_to admin_path
62 62 end
63 63
64 64 def test_email
65 65 raise_delivery_errors = ActionMailer::Base.raise_delivery_errors
66 66 # Force ActionMailer to raise delivery errors so we can catch it
67 67 ActionMailer::Base.raise_delivery_errors = true
68 68 begin
69 69 @test = Mailer.test_email(User.current).deliver
70 70 flash[:notice] = l(:notice_email_sent, ERB::Util.h(User.current.mail))
71 71 rescue Exception => e
72 72 flash[:error] = l(:notice_email_error, ERB::Util.h(Redmine::CodesetUtil.replace_invalid_utf8(e.message.dup)))
73 73 end
74 74 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
75 75 redirect_to settings_path(:tab => 'notifications')
76 76 end
77 77
78 78 def info
79 @db_adapter_name = ActiveRecord::Base.connection.adapter_name
80 79 @checklist = [
81 80 [:text_default_administrator_account_changed, User.default_admin_account_changed?],
82 81 [:text_file_repository_writable, File.writable?(Attachment.storage_path)],
83 82 ["#{l :text_plugin_assets_writable} (./public/plugin_assets)", File.writable?(Redmine::Plugin.public_directory)],
84 83 [:text_rmagick_available, Object.const_defined?(:Magick)],
85 84 [:text_convert_available, Redmine::Thumbnail.convert_available?]
86 85 ]
87 86 end
88 87 end
General Comments 0
You need to be logged in to leave comments. Login now