Compare commits

..

11 Commits
1.3.2 ... 1.3.3

Author SHA1 Message Date
Jean-Philippe Lang
0c98bf9c64 tagged version 1.3.3
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/1.3.3@9415 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 08:19:35 +00:00
Jean-Philippe Lang
5f2ebc202d Set version to 1.3.3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9414 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 08:19:08 +00:00
Jean-Philippe Lang
d85f8425d9 Updated 1.3 CHANGELOG.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9407 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 06:31:45 +00:00
Jean-Philippe Lang
4215198570 Merged r9380 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9396 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 04:45:32 +00:00
Jean-Philippe Lang
ed0d0533e7 Merged r9379 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9394 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 04:42:56 +00:00
Jean-Philippe Lang
22d639402c #safe_attribute? not defined in 1.3-stable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9357 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 13:22:27 +00:00
Jean-Philippe Lang
cda408dd81 Merged r9350 and r9351 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9353 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 12:23:53 +00:00
Toshi MARUYAMA
bec5e4443d Merged r9343 from trunk
Simplified Chinese translation updated by fangzheng (#10611)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9345 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 10:50:36 +00:00
Toshi MARUYAMA
cb37643ea9 Merge r9312 from trunk
pdf: fix tcpdf automatic line break bug (#10554)

Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9322 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-04 12:23:13 +00:00
Toshi MARUYAMA
3e24f6f110 Merge r9313 from trunk
fix Dutch "label_file_added" translation (#10591)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9314 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-03 12:01:30 +00:00
Toshi MARUYAMA
2e6347a2f1 pdf: backport r8731 (#10505)
Fixed that tag[0] may be nil.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.3-stable@9278 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-27 22:36:41 +00:00
11 changed files with 91 additions and 23 deletions

View File

@@ -73,9 +73,7 @@ class AdminController < ApplicationController
def info
@db_adapter_name = ActiveRecord::Base.connection.adapter_name
@checklist = [
[:text_default_administrator_account_changed,
User.find(:first,
:conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?],
[:text_default_administrator_account_changed, User.default_admin_account_changed?],
[:text_file_repository_writable, File.writable?(Attachment.storage_path)],
[:text_plugin_assets_writable, File.writable?(Engines.public_directory)],
[:text_rmagick_available, Object.const_defined?(:Magick)]

View File

@@ -354,7 +354,7 @@ class Mailer < ActionMailer::Base
:conditions => s.conditions
).group_by(&:assigned_to)
issues_by_assignee.each do |assignee, issues|
deliver_reminder(assignee, issues, days) if assignee && assignee.active?
deliver_reminder(assignee, issues, days) if assignee.is_a?(User) && assignee.active?
end
end

View File

@@ -37,7 +37,6 @@ class Message < ActiveRecord::Base
:author_key => :author_id
acts_as_watchable
attr_protected :locked, :sticky
validates_presence_of :board, :subject, :content
validates_length_of :subject, :maximum => 255
validate :cannot_reply_to_locked_topic, :on => :create
@@ -50,7 +49,7 @@ class Message < ActiveRecord::Base
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_messages, *args) } }
safe_attributes 'subject', 'content'
safe_attributes 'locked', 'sticky',
safe_attributes 'locked', 'sticky', 'board_id',
:if => lambda {|message, user|
user.allowed_to?(:edit_messages, message.project)
}

View File

@@ -343,6 +343,11 @@ class User < Principal
find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase])
end
# Returns true if the default admin account can no longer be used
def self.default_admin_account_changed?
!User.active.find_by_login("admin").try(:check_password?, "admin")
end
def to_s
name
end

View File

@@ -399,7 +399,7 @@ nl:
label_f_hour_plural: "%{value} uren"
label_feed_plural: Feeds
label_feeds_access_key_created_on: "RSS toegangssleutel %{value} geleden gemaakt."
label_file_added: Bericht toegevoegd
label_file_added: Bestand toegevoegd
label_file_plural: Bestanden
label_filter_add: Voeg filter toe
label_filter_plural: Filters

View File

@@ -1002,9 +1002,9 @@ zh:
label_child_revision: 子修订
error_scm_annotate_big_text_file: 输入文本内容超长,无法输入。
setting_default_issue_start_date_to_creation_date: 使用当前日期作为新问题的开始日期
button_edit_section: Edit this section
setting_repositories_encodings: Attachments and repositories encodings
description_all_columns: All Columns
button_export: Export
label_export_options: "%{export_format} export options"
error_attachment_too_big: This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})
button_edit_section: 编辑此区域
setting_repositories_encodings: 附件和版本库编码
description_all_columns: 所有列
button_export: 导出
label_export_options: "%{export_format} 导出选项"
error_attachment_too_big: 该文件无法上传。超过文件大小限制 (%{max_size})

View File

@@ -4,6 +4,16 @@ Redmine - project management software
Copyright (C) 2006-2012 Jean-Philippe Lang
http://www.redmine.org/
== 2012-04-14 v1.3.3
* Defect #10505: Error when exporting to PDF with NoMethodError (undefined method `downcase' for nil:NilClass)
* Defect #10554: Defect symbols when exporting tasks in pdf
* Defect #10564: Unable to change locked, sticky flags and board when editing a message
* Defect #10591: Dutch "label_file_added" translation is wrong
* Defect #10622: "Default administrator account changed" is always true
* Patch #10555: rake redmine:send_reminders aborted if issue assigned to group
* Patch #10611: Simplified Chinese translations for 1.3-stable
== 2012-03-11 v1.3.2
* Defect #8194: {{toc}} uses identical anchors for subsections with the same name

View File

@@ -4,7 +4,7 @@ module Redmine
module VERSION #:nodoc:
MAJOR = 1
MINOR = 3
TINY = 2
TINY = 3
# Branch values:
# * official release: nil

View File

@@ -131,6 +131,30 @@ class MessagesControllerTest < ActionController::TestCase
assert_equal 'New body', message.content
end
def test_post_edit_sticky_and_locked
@request.session[:user_id] = 2
post :edit, :board_id => 1, :id => 1,
:message => { :subject => 'New subject',
:content => 'New body',
:locked => '1',
:sticky => '1'}
assert_redirected_to '/boards/1/topics/1'
message = Message.find(1)
assert_equal true, message.sticky?
assert_equal true, message.locked?
end
def test_post_edit_should_allow_to_change_board
@request.session[:user_id] = 2
post :edit, :board_id => 1, :id => 1,
:message => { :subject => 'New subject',
:content => 'New body',
:board_id => 2}
assert_redirected_to '/boards/2/topics/1'
message = Message.find(1)
assert_equal Board.find(2), message.board
end
def test_reply
@request.session[:user_id] = 2
post :reply, :board_id => 1, :id => 1, :reply => { :content => 'This is a test reply', :subject => 'Test reply' }

View File

@@ -574,6 +574,38 @@ class UserTest < ActiveSupport::TestCase
end
end
def test_default_admin_account_changed_should_return_false_if_account_was_not_changed
user = User.find_by_login("admin")
user.password = "admin"
user.save!
assert_equal false, User.default_admin_account_changed?
end
def test_default_admin_account_changed_should_return_true_if_password_was_changed
user = User.find_by_login("admin")
user.password = "newpassword"
user.save!
assert_equal true, User.default_admin_account_changed?
end
def test_default_admin_account_changed_should_return_true_if_account_is_disabled
user = User.find_by_login("admin")
user.password = "admin"
user.status = User::STATUS_LOCKED
user.save!
assert_equal true, User.default_admin_account_changed?
end
def test_default_admin_account_changed_should_return_true_if_account_does_not_exist
user = User.find_by_login("admin")
user.destroy
assert_equal true, User.default_admin_account_changed?
end
def test_roles_for_project
# user with a role
roles = @jsmith.roles_for_project(Project.find(1))

View File

@@ -1803,7 +1803,7 @@ class TCPDF
w = @w - @r_margin - @x;
end
wmax = (w - 2 * @c_margin);
wmax = (w - 3 * @c_margin);
s = txt.gsub("\r", ''); # remove carriage returns
nb = s.length;
@@ -1862,7 +1862,7 @@ class TCPDF
ns += 1;
end
l = GetStringWidth(s[from_j, to_index - from_j + 1]);
l = GetStringWidth(s[from_j, to_index - from_j]);
if (l > wmax)
#Automatic line break
@@ -1945,7 +1945,7 @@ class TCPDF
#Output text in flowing mode
w = @w - @r_margin - @x;
wmax = (w - 2 * @c_margin);
wmax = (w - 3 * @c_margin);
s = txt.gsub("\r", '');
nb = s.length;
@@ -1974,7 +1974,7 @@ class TCPDF
if (nl == 1)
@x = @l_margin;
w = @w - @r_margin - @x;
wmax = (w - 2 * @c_margin);
wmax = (w - 3 * @c_margin);
end
nl += 1;
next
@@ -1982,7 +1982,7 @@ class TCPDF
if (c == " "[0])
sep= i;
end
l = GetStringWidth(s[j, i - j + 1]);
l = GetStringWidth(s[j, i - j]);
if (l > wmax)
#Automatic line break (word wrapping)
if (sep == -1)
@@ -1991,7 +1991,7 @@ class TCPDF
@x = @l_margin;
@y += h;
w=@w - @r_margin - @x;
wmax=(w - 2 * @c_margin);
wmax=(w - 3 * @c_margin);
i += 1
nl += 1
next
@@ -2010,7 +2010,7 @@ class TCPDF
if (nl==1)
@x = @l_margin;
w = @w - @r_margin - @x;
wmax = (w - 2 * @c_margin);
wmax = (w - 3 * @c_margin);
end
nl += 1;
else
@@ -3474,7 +3474,7 @@ class TCPDF
#Extract attributes
# get tag name
tag = element.scan(/([a-zA-Z0-9]*)/).flatten.delete_if {|x| x.length == 0}
tag = tag[0].downcase;
tag = tag[0].to_s.downcase;
# get attributes
attr_array = element.scan(/([^=\s]*)=["\']?([^"\']*)["\']?/)
@@ -3497,7 +3497,7 @@ class TCPDF
#Extract attributes
# get tag name
tag = element.scan(/([a-zA-Z0-9]*)/).flatten.delete_if {|x| x.length == 0}
tag = tag[0].downcase;
tag = tag[0].to_s.downcase;
# get attributes
attr_array = element.scan(/([^=\s]*)=["\']?([^"\']*)["\']?/)