Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
Merge tag '3.3.9' into 3.3-stable-typo3
Browse files Browse the repository at this point in the history
  • Loading branch information
stucki committed Aug 18, 2020
2 parents b6631d2 + 088b27e commit 4cb015a
Show file tree
Hide file tree
Showing 21 changed files with 209 additions and 81 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0')
abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
end

gem "rails", "4.2.7.1"
gem "rails", "4.2.11"
gem "addressable", "2.4.0" if RUBY_VERSION < "2.0"
if RUBY_VERSION < "2.1"
gem "public_suffix", (RUBY_VERSION < "2.0" ? "~> 1.4" : "~> 2.0.5")
Expand All @@ -31,7 +31,7 @@ gem "rails-html-sanitizer", ">= 1.0.3"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin, :jruby]
gem "rbpdf", "~> 1.19.3"
gem "rbpdf", "~> 1.19.6"

# Optional gem for LDAP authentication
group :ldap do
Expand Down
1 change: 1 addition & 0 deletions app/controllers/timelog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def create
:time_entry => {
:project_id => params[:time_entry][:project_id],
:issue_id => @time_entry.issue_id,
:spent_on => @time_entry.spent_on,
:activity_id => @time_entry.activity_id
},
:back_url => params[:back_url]
Expand Down
2 changes: 1 addition & 1 deletion app/models/attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def diskfile
end

def title
title = filename.to_s
title = filename.dup
if description.present?
title << " (#{description})"
end
Expand Down
22 changes: 20 additions & 2 deletions app/models/issue_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,26 @@ def versions(options={})

def sql_for_watcher_id_field(field, operator, value)
db_table = Watcher.table_name
"#{Issue.table_name}.id #{ operator == '=' ? 'IN' : 'NOT IN' } (SELECT #{db_table}.watchable_id FROM #{db_table} WHERE #{db_table}.watchable_type='Issue' AND " +
sql_for_field(field, '=', value, db_table, 'user_id') + ')'

me, others = value.partition { |id| ['0', User.current.id.to_s].include?(id) }
sql = if others.any?
"SELECT #{Issue.table_name}.id FROM #{Issue.table_name} " +
"INNER JOIN #{db_table} ON #{Issue.table_name}.id = #{db_table}.watchable_id AND #{db_table}.watchable_type = 'Issue' " +
"LEFT OUTER JOIN #{Project.table_name} ON #{Project.table_name}.id = #{Issue.table_name}.project_id " +
"WHERE (" +
sql_for_field(field, '=', me, db_table, 'user_id') +
') OR (' +
Project.allowed_to_condition(User.current, :view_issue_watchers) +
' AND ' +
sql_for_field(field, '=', others, db_table, 'user_id') +
')'
else
"SELECT #{db_table}.watchable_id FROM #{db_table} " +
"WHERE #{db_table}.watchable_type='Issue' AND " +
sql_for_field(field, '=', me, db_table, 'user_id')
end

"#{Issue.table_name}.id #{ operator == '=' ? 'IN' : 'NOT IN' } (#{sql})"
end

def sql_for_member_of_group_field(field, operator, value)
Expand Down
4 changes: 2 additions & 2 deletions app/models/mail_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def self.extract_options_from_env(env)
%w(project status tracker category priority assigned_to fixed_version).each do |option|
options[:issue][option.to_sym] = env[option] if env[option]
end
%w(allow_override unknown_user no_permission_check no_account_notice default_group project_from_subaddress).each do |option|
%w(allow_override unknown_user no_permission_check no_account_notice no_notification default_group project_from_subaddress).each do |option|
options[option.to_sym] = env[option] if env[option]
end
if env['private']
Expand Down Expand Up @@ -250,8 +250,8 @@ def receive_issue_reply(issue_id, from_journal=nil)

# add To and Cc as watchers before saving so the watchers can reply to Redmine
add_watchers(issue)
add_attachments(issue)
issue.save!
add_attachments(issue)
if logger
logger.info "MailHandler: issue ##{issue.id} updated by #{user}"
end
Expand Down
18 changes: 9 additions & 9 deletions config/locales/gl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ gl:
invalid: "non é válido"
confirmation: "non coincide coa confirmación"
accepted: "debe ser aceptado"
empty: "non pode estar valeiro"
blank: "non pode estar en blanco"
empty: "non pode estar baleiro"
blank: "non pode estar en branco"
too_long: "é demasiado longo (non máis de %{count} carácteres)"
too_short: "é demasiado curto (non menos de %{count} carácteres)"
wrong_length: "non ten a lonxitude correcta (debe ser de %{count} carácteres)"
Expand Down Expand Up @@ -424,7 +424,7 @@ gl:
label_f_hour: "%{value} hora"
label_f_hour_plural: "%{value} horas"
label_feed_plural: Feeds
label_feeds_access_key_created_on: "Clave de acceso por Atom creada hai %{value}"
label_feeds_access_key_created_on: "Chave de acceso por Atom creada hai %{value}"
label_file_added: Ficheiro engadido
label_file_plural: Ficheiros
label_filter_add: Engadir o filtro
Expand All @@ -433,7 +433,7 @@ gl:
label_follows: posterior a
label_gantt: Gantt
label_general: Xeral
label_generate_key: Xerar clave
label_generate_key: Xerar chave
label_help: Axuda
label_history: Histórico
label_home: Inicio
Expand Down Expand Up @@ -649,7 +649,7 @@ gl:
notice_email_error: "Ocorreu un error enviando o correo (%{value})"
notice_email_sent: "Enviouse un correo a %{value}"
notice_failed_to_save_issues: "Imposible gravar %{count} petición(s) de %{total} seleccionada(s): %{ids}."
notice_feeds_access_key_reseted: A súa clave de acceso para Atom reiniciouse.
notice_feeds_access_key_reseted: A súa chave de acceso para Atom reiniciouse.
notice_file_not_found: A páxina á que tenta acceder non existe.
notice_locking_conflict: Os datos modificáronse por outro usuario.
notice_no_issue_selected: "Ningunha petición seleccionada. Por favor, comprobe a petición que quere modificar"
Expand Down Expand Up @@ -721,8 +721,8 @@ gl:
setting_autofetch_changesets: Autorechear as remisións do repositorio
setting_autologin: "Identificarse automaticamente."
setting_bcc_recipients: Ocultar as copias de carbón (bcc)
setting_commit_fix_keywords: Palabras clave para a corrección
setting_commit_ref_keywords: Palabras clave para a referencia
setting_commit_fix_keywords: Palabras chave para a corrección
setting_commit_ref_keywords: Palabras chave para a referencia
setting_cross_project_issue_relations: Permitir relacionar peticións de distintos proxectos
setting_date_format: Formato da data
setting_default_language: Idioma predeterminado
Expand All @@ -739,7 +739,7 @@ gl:
setting_login_required: Requírese identificación
setting_mail_from: Correo dende o que enviar mensaxes
setting_mail_handler_api_enabled: Activar o programa para mensaxes entrantes
setting_mail_handler_api_key: Clave da API
setting_mail_handler_api_key: Chave da API
setting_per_page_options: Obxectos por páxina
setting_plain_text_mail: só texto plano (non HTML)
setting_protocol: Protocolo
Expand Down Expand Up @@ -1190,7 +1190,7 @@ gl:
label_no_open_issues: no open issues
label_default_values_for_new_users: Default values for new users
error_ldap_bind_credentials: Invalid LDAP Account/Password
setting_sys_api_key: Clave da API
setting_sys_api_key: Chave da API
setting_lost_password: "Esqueceu o contrasinal?"
mail_subject_security_notification: Security notification
mail_body_security_notification_change: ! '%{field} was changed.'
Expand Down
46 changes: 46 additions & 0 deletions doc/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,52 @@ Redmine - project management software
Copyright (C) 2006-2017 Jean-Philippe Lang
http://www.redmine.org/

== 2018-12-09 v3.3.9

=== [Custom fields]

* Defect #8317: Strip whitespace from integer custom field

=== [Email receiving]

* Defect #28576: Attachments are added even if validation fails when updating an issue via email
* Defect #29191: Cannot set no_notification option when receiving emails via IMAP or POP3

=== [PDF export]

* Defect #28125: PNG images on a wiki page don't appear in exported PDF
* Defect #28565: PDF export has too many whitespaces

=== [REST API]

* Defect #20788: REST API with JSON content missing attributes with false values

=== [Rails support]

* Feature #30043: Update Rails to 4.2.11

=== [SCM]

* Defect #29413: Mercurial 4.7 compatibility

=== [Text formatting]

* Defect #29038: Thumbnail macro causes attachment file not found and broken filename and link

=== [Time tracking]

* Patch #29308: Time entry creation: preserve 'spent on' value when using 'Create and Continue'

=== [Translations]

* Patch #29702: Brazilian wiki help translation update
* Patch #29703: Brazilian translation (jstoolbar-pt-br.js) update
* Patch #29735: Galician translation fix for the words empty, blank, and key

=== [UI]

* Defect #29950: Fix list rendering inside project description in projects#index

== 2018-06-10 v3.3.8

=== [Issues]
Expand Down
2 changes: 1 addition & 1 deletion lib/redmine/field_format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def cast_single_value(custom_field, value, customized=nil)

def validate_single_value(custom_field, value, customized=nil)
errs = super
errs << ::I18n.t('activerecord.errors.messages.not_a_number') unless value.to_s =~ /^[+-]?\d+$/
errs << ::I18n.t('activerecord.errors.messages.not_a_number') unless value.to_s.strip =~ /^[+-]?\d+$/
errs
end

Expand Down
6 changes: 4 additions & 2 deletions lib/redmine/scm/adapters/mercurial/redminehelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@
</rhmanifest>
"""
import re, time, cgi, urllib
from mercurial import cmdutil, commands, node, error, hg
from mercurial import cmdutil, commands, node, error, hg, registrar

cmdtable = {}
command = cmdutil.command(cmdtable)
command = registrar.command(cmdtable) if hasattr(registrar, 'command') else cmdutil.command(cmdtable)

_x = cgi.escape
_u = lambda s: cgi.escape(urllib.quote(s))

def _changectx(repo, rev):
if isinstance(rev, str):
rev = repo.lookup(rev)
if hasattr(repo, 'changectx'):
return repo.changectx(rev)
else:
Expand Down
2 changes: 1 addition & 1 deletion lib/redmine/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Redmine
module VERSION #:nodoc:
MAJOR = 3
MINOR = 3
TINY = 8
TINY = 9

# Branch values:
# * official release: nil
Expand Down
2 changes: 1 addition & 1 deletion lib/redmine/views/builders/structure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def encode_value(value)
end

def method_missing(sym, *args, &block)
if args.any?
if args.count > 0
if args.first.is_a?(Hash)
if @struct.last.is_a?(Array)
@struct.last << args.first unless block
Expand Down
48 changes: 24 additions & 24 deletions public/help/pt-br/wiki_syntax_markdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Wiki formatting</title>
<title>Formata&ccedil;&atilde;o Wiki</title>
<style type="text/css">
h1 { font-family: Verdana, sans-serif; font-size: 14px; text-align: center; color: #444; }
body { font-family: Verdana, sans-serif; font-size: 12px; color: #444; }
Expand All @@ -20,46 +20,46 @@
</head>
<body>

<h1>Wiki Syntax Quick Reference (Markdown)</h1>
<h1>Sintaxe Wiki - Refer&ecirc;ncia R&aacute;pida (Markdown)</h1>

<table style="width:100%">
<tr><th colspan="3">Font Styles</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_strong.png" style="border: 1px solid #bbb;" alt="Strong" /></th><td style="width:50%;">**Strong**</td><td style="width:50%;"><strong>Strong</strong></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_em.png" style="border: 1px solid #bbb;" alt="Italic" /></th><td>*Italic*</td><td><em>Italic</em></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_del.png" style="border: 1px solid #bbb;" alt="Deleted" /></th><td>~~Deleted~~</td><td><del>Deleted</del></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_code.png" style="border: 1px solid #bbb;" alt="Inline Code" /></th><td>`Inline Code`</td><td><code>Inline Code</code></td></tr>
<tr><th colspan="3">Estilos de Fonte</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_strong.png" style="border: 1px solid #bbb;" alt="Strong" /></th><td style="width:50%;">**Negrito**</td><td style="width:50%;"><strong>Negrito</strong></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_em.png" style="border: 1px solid #bbb;" alt="Italic" /></th><td>*It&aacute;lico*</td><td><em>It&aacute;lico</em></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_del.png" style="border: 1px solid #bbb;" alt="Deleted" /></th><td>~~Tachado~~</td><td><del>Tachado</del></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_code.png" style="border: 1px solid #bbb;" alt="Inline Code" /></th><td>`C&oacute;digo Inline`</td><td><code>C&oacute;digo Inline</code></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_pre.png" style="border: 1px solid #bbb;" alt="Preformatted text" /></th><td>~~~<br />&nbsp;lines<br />&nbsp;of code<br />~~~</td><td>
<pre>
lines
of code
linhas
de c&oacute;digo
</pre>
</td></tr>

<tr><th colspan="3">Lists</th></tr>
<tr><th colspan="3">Listas</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_ul.png" style="border: 1px solid #bbb;" alt="Unordered list" /></th><td>* Item 1<br />&nbsp;&nbsp;* Sub<br />* Item 2</td><td><ul><li>Item 1<ul><li>Sub</li></ul></li><li>Item 2</li></ul></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_ol.png" style="border: 1px solid #bbb;" alt="Ordered list" /></th><td>1. Item 1<br />&nbsp;&nbsp;&nbsp;1. Sub<br />2. Item 2</td><td><ol><li>Item 1<ol><li>Sub</li></ol></li><li>Item 2</li></ol></td></tr>

<tr><th colspan="3">Headings</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_h1.png" style="border: 1px solid #bbb;" alt="Heading 1" /></th><td># Title 1</td><td><h1>Title 1</h1></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_h2.png" style="border: 1px solid #bbb;" alt="Heading 2" /></th><td>## Title 2</td><td><h2>Title 2</h2></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_h3.png" style="border: 1px solid #bbb;" alt="Heading 3" /></th><td>### Title 3</td><td><h3>Title 3</h3></td></tr>
<tr><th colspan="3">Cabe&ccedil;alhos</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_h1.png" style="border: 1px solid #bbb;" alt="Heading 1" /></th><td># T&iacute;tulo 1</td><td><h1>T&iacute;tulo 1</h1></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_h2.png" style="border: 1px solid #bbb;" alt="Heading 2" /></th><td>## T&iacute;tulo 2</td><td><h2>T&iacute;tulo 2</h2></td></tr>
<tr><th><img src="../../images/jstoolbar/bt_h3.png" style="border: 1px solid #bbb;" alt="Heading 3" /></th><td>### T&iacute;tulo 3</td><td><h3>T&iacute;tulo 3</h3></td></tr>

<tr><th colspan="3">Links</th></tr>
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
<tr><th></th><td>[Foo](http://foo.bar)</td><td><a href="#">Foo</a></td></tr>

<tr><th colspan="3">Redmine links</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_link.png" style="border: 1px solid #bbb;" alt="Link to a Wiki page" /></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
<tr><th colspan="3">Links do Redmine</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_link.png" style="border: 1px solid #bbb;" alt="Link to a Wiki page" /></th><td>[[P&aacute;gina Wiki]]</td><td><a href="#">P&aacute;gina Wiki</a></td></tr>
<tr><th></th><td>Tarefa #12</td><td>Tarefa <a href="#">#12</a></td></tr>
<tr><th></th><td>Revis&atilde;o r43</td><td>Revis&atilde;o <a href="#">r43</a></td></tr>
<tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
<tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
<tr><th></th><td>source:algum/arquivo</td><td><a href="#">source:algum/arquivo</a></td></tr>

<tr><th colspan="3">Inline images</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_img.png" style="border: 1px solid #bbb;" alt="Image" /></th><td>![](<em>image_url</em>)</td><td></td></tr>
<tr><th></th><td>![](<em>attached_image</em>)</td><td></td></tr>
<tr><th colspan="3">Imagens inline</th></tr>
<tr><th><img src="../../images/jstoolbar/bt_img.png" style="border: 1px solid #bbb;" alt="Image" /></th><td>![](<em>url_da_imagem</em>)</td><td></td></tr>
<tr><th></th><td>![](<em>imagem_anexada</em>)</td><td></td></tr>

<tr><th colspan="3">Tables</th></tr>
<tr><th colspan="3">Tabelas</th></tr>
<tr>
<th></th>
<td>| A | B | C |<br />|---|---|---|<br />| A | B | C |<br />| D | E | F |</td>
Expand All @@ -76,7 +76,7 @@ <h1>Wiki Syntax Quick Reference (Markdown)</h1>

</table>

<p><a href="wiki_syntax_detailed_markdown.html" onclick="window.open('wiki_syntax_detailed_markdown.html', '', ''); return false;">More Information</a></p>
<p><a href="wiki_syntax_detailed_markdown.html" onclick="window.open('wiki_syntax_detailed_markdown.html', '', ''); return false;">Mais Informa&ccedil;&otilde;es</a></p>

</body>
</html>
Loading

0 comments on commit 4cb015a

Please sign in to comment.