@@ -17,9 +17,7 | |||||
17 |
|
17 | |||
18 | class AdminController < ApplicationController |
|
18 | class AdminController < ApplicationController | |
19 | layout 'admin' |
|
19 | layout 'admin' | |
20 |
|
||||
21 | before_filter :require_admin |
|
20 | before_filter :require_admin | |
22 |
|
||||
23 | helper :sort |
|
21 | helper :sort | |
24 | include SortHelper |
|
22 | include SortHelper | |
25 |
|
23 | |||
@@ -30,12 +28,10 class AdminController < ApplicationController | |||||
30 | def projects |
|
28 | def projects | |
31 | @status = params[:status] ? params[:status].to_i : 1 |
|
29 | @status = params[:status] ? params[:status].to_i : 1 | |
32 | c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status]) |
|
30 | c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status]) | |
33 |
|
||||
34 | unless params[:name].blank? |
|
31 | unless params[:name].blank? | |
35 | name = "%#{params[:name].strip.downcase}%" |
|
32 | name = "%#{params[:name].strip.downcase}%" | |
36 | c << ["LOWER(identifier) LIKE ? OR LOWER(name) LIKE ?", name, name] |
|
33 | c << ["LOWER(identifier) LIKE ? OR LOWER(name) LIKE ?", name, name] | |
37 | end |
|
34 | end | |
38 |
|
||||
39 | @projects = Project.find :all, :order => 'lft', |
|
35 | @projects = Project.find :all, :order => 'lft', | |
40 | :conditions => c.conditions |
|
36 | :conditions => c.conditions | |
41 |
|
37 | |||
@@ -77,7 +73,9 class AdminController < ApplicationController | |||||
77 | def info |
|
73 | def info | |
78 | @db_adapter_name = ActiveRecord::Base.connection.adapter_name |
|
74 | @db_adapter_name = ActiveRecord::Base.connection.adapter_name | |
79 | @checklist = [ |
|
75 | @checklist = [ | |
80 | [:text_default_administrator_account_changed, User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?], |
|
76 | [:text_default_administrator_account_changed, | |
|
77 | User.find(:first, | |||
|
78 | :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?], | |||
81 | [:text_file_repository_writable, File.writable?(Attachment.storage_path)], |
|
79 | [:text_file_repository_writable, File.writable?(Attachment.storage_path)], | |
82 | [:text_plugin_assets_writable, File.writable?(Engines.public_directory)], |
|
80 | [:text_plugin_assets_writable, File.writable?(Engines.public_directory)], | |
83 | [:text_rmagick_available, Object.const_defined?(:Magick)] |
|
81 | [:text_rmagick_available, Object.const_defined?(:Magick)] |
General Comments 0
You need to be logged in to leave comments.
Login now