Commit b84517cd authored by Francisco Juan's avatar Francisco Juan

Merge commit 'v2.7.0' into chili2

Conflicts:
	.gitignore
	Gemfile
	app/helpers/repositories_helper.rb
	app/views/custom_fields/_form.rhtml
	app/views/wiki/annotate.rhtml
	app/views/wiki/diff.rhtml
	app/views/wiki/show.rhtml
	extra/svn/Redmine.pm
parents b1f349a6 ad996d78

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
*.rbc *.rbc
doc/app doc/app
/.bundle /.bundle
/Gemfile.local
/.rvmrc* /.rvmrc*
backup/smtp.yml backup/smtp.yml
public/javascripts/piwik.js public/javascripts/piwik.js
source :rubygems source :rubygems
gem "rails", "2.3.12" gem "rails", "2.3.14"
gem "coderay", "~> 0.9.7" gem "coderay", "~> 0.9.7"
gem "i18n", "~> 0.4.2" gem "i18n", "~> 0.4.2"
gem "rubytree", "~> 0.5.2", :require => 'tree' gem "rubytree", "~> 0.5.2", :require => 'tree'
gem "rdoc", ">= 2.4.2" gem "rdoc", ">= 2.4.2"
# Needed only on RUBY_VERSION = 1.8, ruby 1.9+ compatible interpreters should bring their csv
gem "fastercsv", "~> 1.5.0", :platforms => [:ruby_18, :jruby, :mingw_18]
group :test do group :test do
gem 'shoulda', '~> 2.10.3' gem 'shoulda', '~> 2.10.3'
gem 'edavis10-object_daddy', :require => 'object_daddy' gem 'edavis10-object_daddy', :require => 'object_daddy'
gem 'mocha' gem 'mocha'
gem 'capybara'
end
group :ldap do
gem "net-ldap", '~> 0.2.2'
end end
group :openid do group :openid do
...@@ -19,6 +26,20 @@ end ...@@ -19,6 +26,20 @@ end
group :rmagick do group :rmagick do
gem "rmagick", ">= 1.15.17" gem "rmagick", ">= 1.15.17"
# Older distributions might not have a sufficiently new ImageMagick version
# for the current rmagick release (current rmagick is rmagick 2, which
# requires ImageMagick 6.4.9 or later). If this is the case for you, comment
# the line above this comment block and uncomment the one underneath it to
# get an rmagick version known to work on older distributions.
#
# The following distributions are known to *not* ship with a usable
# ImageMagick version. There might be additional ones.
# * Ubuntu 9.10 and older
# * Debian Lenny 5.0 and older
# * CentOS 5 and older
# * RedHat 5 and older
#
#gem "rmagick", "< 2.0.0"
end end
#Required by gitolite #Required by gitolite
...@@ -36,10 +57,22 @@ platforms :mri do ...@@ -36,10 +57,22 @@ platforms :mri do
gem "pg", "~> 0.9.0" gem "pg", "~> 0.9.0"
# gem "postgres-pr" # gem "postgres-pr"
end end
end
platforms :mri_18, :mingw_18 do
group :mysql do
gem "mysql"
# gem "ruby-mysql"
end
group :sqlite do group :sqlite do
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3" gem "sqlite3-ruby", "< 1.3", :require => "sqlite3"
# please tell me, if you are fond of a pure ruby sqlite3 binding end
end
platforms :mri_19, :mingw_19 do
group :sqlite do
gem "sqlite3"
end end
end end
...@@ -49,18 +82,27 @@ platforms :jruby do ...@@ -49,18 +82,27 @@ platforms :jruby do
group :mysql do group :mysql do
gem "activerecord-jdbcmysql-adapter" gem "activerecord-jdbcmysql-adapter"
end end
group :postgres do group :postgres do
gem "activerecord-jdbcpostgresql-adapter" gem "activerecord-jdbcpostgresql-adapter"
end end
group :sqlite do group :sqlite do
gem "activerecord-jdbcsqlite3-adapter" gem "activerecord-jdbcsqlite3-adapter"
end end
end end
# Load a "local" Gemfile
gemfile_local = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.readable?(gemfile_local)
puts "Loading #{gemfile_local} ..." if $DEBUG
instance_eval(File.read(gemfile_local))
end
# Load plugins' Gemfiles # Load plugins' Gemfiles
Dir.glob File.expand_path("../vendor/plugins/*/Gemfile", __FILE__) do |file| ["plugins", "chiliproject_plugins"].each do |plugin_path|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` Dir.glob File.expand_path("../vendor/#{plugin_path}/*/Gemfile", __FILE__) do |file|
instance_eval File.read(file) puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
end
end end
#-- encoding: UTF-8
#-- copyright #-- copyright
# ChiliProject is a project management system. # ChiliProject is a project management system.
# #
# Copyright (C) 2010-2011 the ChiliProject Team # Copyright (C) 2010-2012 the ChiliProject Team
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
...@@ -19,9 +20,9 @@ class AccountController < ApplicationController ...@@ -19,9 +20,9 @@ class AccountController < ApplicationController
# Login request and validation # Login request and validation
def login def login
if request.get? if User.current.logged?
logout_user redirect_to home_url
else elsif request.post?
authenticate_user authenticate_user
end end
end end
......
#-- encoding: UTF-8
#-- copyright #-- copyright
# ChiliProject is a project management system. # ChiliProject is a project management system.
# #
# Copyright (C) 2010-2011 the ChiliProject Team # Copyright (C) 2010-2012 the ChiliProject Team
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
......
#-- encoding: UTF-8
#-- copyright #-- copyright
# ChiliProject is a project management system. # ChiliProject is a project management system.
# #
# Copyright (C) 2010-2011 the ChiliProject Team # Copyright (C) 2010-2012 the ChiliProject Team
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
...@@ -38,7 +39,7 @@ class AdminController < ApplicationController ...@@ -38,7 +39,7 @@ class AdminController < ApplicationController
end end
def plugins def plugins
@plugins = Redmine::Plugin.all @plugins = Redmine::Plugin.all.sort
end end
# Loads the default configuration # Loads the default configuration
......
#-- encoding: UTF-8
#-- copyright #-- copyright
# ChiliProject is a project management system. # ChiliProject is a project management system.
# #
# Copyright (C) 2010-2011 the ChiliProject Team # Copyright (C) 2010-2012 the ChiliProject Team
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
...@@ -24,6 +25,12 @@ class ApplicationController < ActionController::Base ...@@ -24,6 +25,12 @@ class ApplicationController < ActionController::Base
layout 'base' layout 'base'
exempt_from_layout 'builder', 'rsb' exempt_from_layout 'builder', 'rsb'
protect_from_forgery
def handle_unverified_request
super
cookies.delete(:autologin)
end
# Remove broken cookie after upgrade from 0.8.x (#4292) # Remove broken cookie after upgrade from 0.8.x (#4292)
# See https://rails.lighthouseapp.com/projects/8994/tickets/3360 # See https://rails.lighthouseapp.com/projects/8994/tickets/3360
# TODO: remove it when Rails is fixed # TODO: remove it when Rails is fixed
...@@ -36,9 +43,26 @@ class ApplicationController < ActionController::Base ...@@ -36,9 +43,26 @@ class ApplicationController < ActionController::Base
end end
end end
# FIXME: Remove this when all of Rack and Rails have learned how to
# properly use encodings
before_filter :params_filter
def params_filter
self.utf8nize!(params) if RUBY_VERSION >= '1.9'