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 @@
*.rbc
doc/app
/.bundle
/Gemfile.local
/.rvmrc*
backup/smtp.yml
public/javascripts/piwik.js
source :rubygems
gem "rails", "2.3.12"
gem "rails", "2.3.14"
gem "coderay", "~> 0.9.7"
gem "i18n", "~> 0.4.2"
gem "rubytree", "~> 0.5.2", :require => 'tree'
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
gem 'shoulda', '~> 2.10.3'
gem 'edavis10-object_daddy', :require => 'object_daddy'
gem 'mocha'
gem 'capybara'
end
group :ldap do
gem "net-ldap", '~> 0.2.2'
end
group :openid do
......@@ -19,6 +26,20 @@ end
group :rmagick do
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
#Required by gitolite
......@@ -36,10 +57,22 @@ platforms :mri do
gem "pg", "~> 0.9.0"
# gem "postgres-pr"
end
end
platforms :mri_18, :mingw_18 do
group :mysql do
gem "mysql"
# gem "ruby-mysql"
end
group :sqlite do
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
......@@ -49,18 +82,27 @@ platforms :jruby do
group :mysql do
gem "activerecord-jdbcmysql-adapter"
end
group :postgres do
gem "activerecord-jdbcpostgresql-adapter"
end
group :sqlite do
gem "activerecord-jdbcsqlite3-adapter"
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
Dir.glob File.expand_path("../vendor/plugins/*/Gemfile", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
["plugins", "chiliproject_plugins"].each do |plugin_path|
Dir.glob File.expand_path("../vendor/#{plugin_path}/*/Gemfile", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
end
end
#-- encoding: UTF-8
#-- copyright
# 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
# modify it under the terms of the GNU General Public License
......@@ -19,9 +20,9 @@ class AccountController < ApplicationController
# Login request and validation
def login
if request.get?
logout_user
else
if User.current.logged?
redirect_to home_url
elsif request.post?
authenticate_user
end
end
......
#-- encoding: UTF-8
#-- copyright
# 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
# modify it under the terms of the GNU General Public License
......
#-- encoding: UTF-8
#-- copyright
# 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
# modify it under the terms of the GNU General Public License
......@@ -38,7 +39,7 @@ class AdminController < ApplicationController
end
def plugins
@plugins = Redmine::Plugin.all
@plugins = Redmine::Plugin.all.sort
end
# Loads the default configuration
......
#-- encoding: UTF-8
#-- copyright
# 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
# modify it under the terms of the GNU General Public License
......@@ -24,6 +25,12 @@ class ApplicationController < ActionController::Base
layout 'base'
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)
# See https://rails.lighthouseapp.com/projects/8994/tickets/3360
# TODO: remove it when Rails is fixed
......@@ -36,9 +43,26 @@ class ApplicationController < ActionController::Base
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'
end
def utf8nize!(obj)
if obj.is_a? String
obj.respond_to?(:force_encoding) ? obj.force_encoding("UTF-8") : obj
elsif obj.is_a? Hash
obj.each {|k, v| obj[k] = self.utf8nize!(v)}
elsif obj.is_a? Array
obj.each {|v| self.utf8nize!(v)}
else
obj
end
end
before_filter :user_setup, :check_if_login_required, :set_localization
filter_parameter_logging :password
protect_from_forgery
rescue_from ActionController::InvalidAuthenticityToken, :with => :invalid_authenticity_token
......@@ -257,7 +281,7 @@ class ApplicationController < ActionController::Base
end
def redirect_back_or_default(default)
back_url = CGI.unescape(params[:back_url].to_s)
back_url = URI.escape(CGI.unescape(params[:back_url].to_s))
if !back_url.blank?
begin
uri = URI.parse(back_url)
......
#-- encoding: UTF-8
#-- copyright
# 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
# modify it under the terms of the GNU General Public License
......
#-- encoding: UTF-8
#-- copyright
# 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
# modify it under the terms of the GNU General Public License
......
#-- encoding: UTF-8
#-- copyright
# 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
# modify it under the terms of the GNU General Public License
......
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2011 the ChiliProject Team