diff --git a/app/models/channel/email_build.rb b/app/models/channel/email_build.rb index 2b0c6cec6..e801b7547 100644 --- a/app/models/channel/email_build.rb +++ b/app/models/channel/email_build.rb @@ -20,7 +20,7 @@ module Channel::EmailBuild # set organization organization = Setting.get('organization') - if organization then; + if organization then mail['Organization'] = organization.to_s end diff --git a/app/models/observer/tag/ticket_history.rb b/app/models/observer/tag/ticket_history.rb index 7645c7551..9daeaf0f5 100644 --- a/app/models/observer/tag/ticket_history.rb +++ b/app/models/observer/tag/ticket_history.rb @@ -8,7 +8,7 @@ class Observer::Tag::TicketHistory < ActiveRecord::Observer def after_create(record) # just process ticket object tags - return true if record.tag_object.name != 'Ticket'; + return true if record.tag_object.name != 'Ticket' # add ticket history History.add( @@ -22,7 +22,7 @@ class Observer::Tag::TicketHistory < ActiveRecord::Observer def after_destroy(record) # just process ticket object tags - return true if record.tag_object.name != 'Ticket'; + return true if record.tag_object.name != 'Ticket' # add ticket history History.add( diff --git a/lib/import/otrs.rb b/lib/import/otrs.rb index ec2fb7456..a17dd3819 100644 --- a/lib/import/otrs.rb +++ b/lib/import/otrs.rb @@ -555,7 +555,7 @@ module Import::OTRS ID: :id, ValidID: :active, Comment: :note, - }; + } Ticket::State.all.each {|state| state.name = state.name + '_tmp' @@ -611,7 +611,7 @@ module Import::OTRS ID: :id, ValidID: :active, Comment: :note, - }; + } result.each { |priority| _set_valid(priority) @@ -655,7 +655,7 @@ module Import::OTRS QueueID: :id, ValidID: :active, Comment: :note, - }; + } result.each { |group| _set_valid(group) @@ -702,7 +702,7 @@ module Import::OTRS UserLastname: :lastname, UserLogin: :login, UserPw: :password, - }; + } result.each { |user| # puts 'USER: ' + user.inspect @@ -770,7 +770,7 @@ module Import::OTRS UserZip: :zip, UserCity: :city, UserCountry: :country, - }; + } done = true result.each { |user| diff --git a/lib/import/otrs2.rb b/lib/import/otrs2.rb index 49996a7b2..7da76585f 100644 --- a/lib/import/otrs2.rb +++ b/lib/import/otrs2.rb @@ -803,7 +803,7 @@ module Import::OTRS2 ID: :id, ValidID: :active, Comment: :note, - }; + } # rename states to handle not uniq issues Ticket::State.all.each {|state| @@ -858,7 +858,7 @@ module Import::OTRS2 ID: :id, ValidID: :active, Comment: :note, - }; + } records.each { |priority| _set_valid(priority) @@ -899,7 +899,7 @@ module Import::OTRS2 QueueID: :id, ValidID: :active, Comment: :note, - }; + } records.each { |group| _set_valid(group) @@ -945,7 +945,7 @@ module Import::OTRS2 UserLastname: :lastname, UserLogin: :login, UserPw: :password, - }; + } records.each { |user| _set_valid(user) @@ -1072,7 +1072,7 @@ module Import::OTRS2 UserZip: :zip, UserCity: :city, UserCountry: :country, - }; + } role_agent = Role.lookup( name: 'Agent' ) role_customer = Role.lookup( name: 'Customer' ) @@ -1142,7 +1142,7 @@ module Import::OTRS2 CustomerCompanyName: :name, ValidID: :active, CustomerCompanyComment: :note, - }; + } records.each { |organization| _set_valid(organization) diff --git a/script/websocket-server.rb b/script/websocket-server.rb index 9501ee119..29c712d37 100755 --- a/script/websocket-server.rb +++ b/script/websocket-server.rb @@ -55,7 +55,7 @@ end.parse! if ARGV[0] != 'start' && ARGV[0] != 'stop' puts "Usage: #{File.basename(__FILE__)} start|stop [options]" - exit; + exit end puts "Starting websocket server on #{ @options[:b] }:#{ @options[:p] } (secure:#{ @options[:s].to_s },pid:#{@options[:i].to_s})"