Corrected with rubocop cop 'Style/Next'.
This commit is contained in:
parent
c282fd2b37
commit
d8190dc5b4
2 changed files with 10 additions and 8 deletions
|
@ -8,9 +8,10 @@ module Channel::Filter::Trusted
|
|||
# check if trust x-headers
|
||||
if !channel[:trusted]
|
||||
mail.each {|key, _value|
|
||||
if key =~ /^x-zammad/i
|
||||
mail.delete(key)
|
||||
end
|
||||
|
||||
next if key !~ /^x-zammad/i
|
||||
|
||||
mail.delete(key)
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -31,11 +31,12 @@ module Ticket::Number::Increment
|
|||
min_digs = min_digs.to_i - 1
|
||||
end
|
||||
fillup = Setting.get('system_id') || '1'
|
||||
( 1..100 ).each do |_i|
|
||||
if ( fillup.length.to_i + counter_increment.to_s.length.to_i ) < min_digs.to_i
|
||||
fillup = fillup + '0'
|
||||
end
|
||||
end
|
||||
( 1..100 ).each {
|
||||
|
||||
next if ( fillup.length.to_i + counter_increment.to_s.length.to_i ) >= min_digs.to_i
|
||||
|
||||
fillup = fillup + '0'
|
||||
}
|
||||
number = fillup.to_s + counter_increment.to_s
|
||||
|
||||
# calculate a checksum
|
||||
|
|
Loading…
Reference in a new issue