From bc38f1c1ae380bdf65f2dc6ca5cba9bd60a8000c Mon Sep 17 00:00:00 2001 From: Denny Bresch Date: Wed, 31 Jul 2019 10:23:48 +0200 Subject: [PATCH] Maintenance: Fixed typos in inline comments. --- .../controllers/_application_controller.coffee | 12 ++++++------ .../_application_controller_form.coffee | 4 ++-- .../_application_controller_generic.coffee | 2 +- .../app/controllers/_channel/facebook.coffee | 2 +- .../app/controllers/_channel/twitter.coffee | 2 +- .../app/controllers/_integration/ldap.coffee | 2 +- .../app/controllers/_profile/avatar.coffee | 8 ++++---- .../app/controllers/_settings/area.coffee | 2 +- .../app/controllers/_settings/form.coffee | 2 +- .../app/controllers/_ui_element/active.coffee | 2 +- .../_ui_element/autocompletion.coffee | 2 +- .../app/controllers/_ui_element/basedate.coffee | 2 +- .../app/controllers/_ui_element/boolean.coffee | 2 +- .../app/controllers/_ui_element/checkbox.coffee | 2 +- .../app/controllers/_ui_element/ical_feed.coffee | 2 +- .../_ui_element/postmaster_match.coffee | 2 +- .../_ui_element/postmaster_set.coffee | 2 +- .../app/controllers/_ui_element/radio.coffee | 2 +- .../_ui_element/searchable_select.coffee | 2 +- .../app/controllers/_ui_element/select.coffee | 2 +- .../controllers/_ui_element/select_search.coffee | 2 +- .../app/controllers/_ui_element/sla_times.coffee | 2 +- .../_ui_element/ticket_perform_action.coffee | 4 ++-- .../_ui_element/ticket_selector.coffee | 2 +- .../app/controllers/_ui_element/timezone.coffee | 2 +- .../controllers/_ui_element/tree_select.coffee | 2 +- .../javascripts/app/controllers/api.coffee | 2 +- .../javascripts/app/controllers/chat.coffee | 2 +- .../content_can_be_published_form.coffee | 2 +- .../app/controllers/layout_ref.coffee | 2 +- .../app/controllers/navigation.coffee | 8 ++++---- .../app/controllers/password_reset.coffee | 2 +- .../app/controllers/ticket_zoom.coffee | 10 +++++----- .../article_action/email_reply.coffee | 2 +- .../controllers/ticket_zoom/article_new.coffee | 2 +- .../controllers/ticket_zoom/article_view.coffee | 16 ++++++++-------- .../controllers/ticket_zoom/highlighter.coffee | 4 ++-- .../app/controllers/ticket_zoom/title.coffee | 2 +- .../widget/online_notification.coffee | 4 ++-- .../controllers/widget/session_taken_over.coffee | 4 ++-- .../widget/switch_back_to_user.coffee | 2 +- .../app/controllers/widget/ticket_stats.coffee | 2 +- .../app/models/_application_model.coffee | 14 +++++++------- app/assets/javascripts/app/models/user.coffee | 4 ++-- .../application_controller/handles_devices.rb | 2 +- app/controllers/channels_email_controller.rb | 4 ++-- app/controllers/integration/cti_controller.rb | 2 +- .../integration/placetel_controller.rb | 2 +- .../integration/sipgate_controller.rb | 2 +- app/controllers/sessions_controller.rb | 6 +++--- app/controllers/users_controller.rb | 8 ++++---- app/models/activity_stream.rb | 2 +- app/models/application_model/can_associations.rb | 4 ++-- app/models/application_model/can_lookup.rb | 2 +- .../can_query_case_insensitive_where_or_sql.rb | 8 ++++---- app/models/avatar.rb | 2 +- app/models/calendar.rb | 4 ++-- app/models/channel/filter/auto_response_check.rb | 4 ++-- app/models/channel/filter/follow_up_check.rb | 2 +- app/models/channel/filter/identify_sender.rb | 2 +- app/models/channel/filter/monitoring_base.rb | 4 ++-- app/models/chat.rb | 6 +++--- app/models/concerns/can_csv_import.rb | 6 +++--- app/models/concerns/has_activity_stream_log.rb | 2 +- app/models/concerns/has_history.rb | 4 ++-- app/models/concerns/has_search_index_backend.rb | 2 +- app/models/cti/driver/base.rb | 8 ++++---- app/models/cti/log.rb | 2 +- app/models/email_address.rb | 2 +- app/models/job.rb | 2 +- app/models/knowledge_base/answer.rb | 2 +- app/models/knowledge_base/category.rb | 2 +- .../observer/organization/ref_object_touch.rb | 2 +- .../article/communicate_sms/background_job.rb | 2 +- .../observer/ticket/article/fillup_from_email.rb | 2 +- app/models/observer/ticket/article_changes.rb | 4 ++-- app/models/observer/transaction.rb | 2 +- app/models/online_notification.rb | 6 +++--- app/models/organization/assets.rb | 2 +- app/models/overview.rb | 2 +- app/models/package.rb | 10 +++++----- app/models/recent_view/assets.rb | 2 +- app/models/scheduler.rb | 4 ++-- app/models/store.rb | 2 +- app/models/store/file.rb | 2 +- app/models/tag.rb | 2 +- app/models/ticket.rb | 8 ++++---- app/models/ticket/escalation.rb | 4 ++-- app/models/ticket/number.rb | 2 +- app/models/ticket/screen_options.rb | 2 +- app/models/ticket/search_index.rb | 2 +- app/models/ticket/subject.rb | 2 +- app/models/transaction/notification.rb | 6 +++--- app/models/transaction/slack.rb | 4 ++-- app/models/user.rb | 10 +++++----- app/models/user_device.rb | 2 +- config/initializers/core_ext.rb | 2 +- .../postgresql/schema_statements.rb | 2 +- lib/db_helper.rb | 2 +- lib/enrichment/clearbit/organization.rb | 2 +- lib/enrichment/clearbit/user.rb | 2 +- lib/import/otrs/import_stats.rb | 2 +- lib/mixin/required_sub_paths.rb | 2 +- lib/notification_factory/renderer.rb | 4 ++-- lib/stats/ticket_channel_distribution.rb | 2 +- lib/stats/ticket_reopen.rb | 4 ++-- lib/websocket_server.rb | 2 +- 107 files changed, 183 insertions(+), 183 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller.coffee b/app/assets/javascripts/app/controllers/_application_controller.coffee index b062cdf60..c9769a3ee 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.coffee @@ -4,7 +4,7 @@ class App.Controller extends Spine.Controller constructor: (params) -> - # unbind old bindlings + # unbind old bindings if params && params.el && params.el.unbind params.el.unbind() @@ -93,7 +93,7 @@ class App.Controller extends Spine.Controller @off() @stopListening() - # add @title methode to set title + # add @title method to set title title: (name, translate = false) -> # $('html head title').html(@Config.get(product_name) + ' - ' + App.i18n.translateInline(name)) title = name @@ -115,18 +115,18 @@ class App.Controller extends Spine.Controller App.Interval.reset() App.WebSocket.close(force: true) - # add @notify methode to create notification + # add @notify method to create notification notify: (data) -> App.Event.trigger 'notify', data - # add @notifyDesktop methode to create desktop notification + # add @notifyDesktop method to create desktop notification notifyDesktop: (data) -> App.Event.trigger 'notifyDesktop', data - # add @navupdate methode to update navigation + # add @navupdate method to update navigation navupdate: (url, force = false) -> - # ignore navupdate untill #clues are gone + # ignore navupdate until #clues are gone return if !force && window.location.hash is '#clues' App.Event.trigger 'navupdate', url diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.coffee index 863e413ff..5e0c39982 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.coffee @@ -689,7 +689,7 @@ class App.ControllerForm extends App.Controller # set forms to read only during communication with backend lookupForm.find('button, input, select, textarea').prop('readonly', true) - # disable radio and checbkox buttons + # disable radio and checkbox buttons lookupForm.find('input[type=checkbox], input[type=radio]').prop('disabled', true) # disable additionals submits @@ -714,7 +714,7 @@ class App.ControllerForm extends App.Controller # enable fields again lookupForm.find('button, input, select, textarea').prop('readonly', false) - # enable radio and checbkox buttons + # enable radio and checkbox buttons lookupForm.find('input[type=checkbox], input[type=radio]').prop('disabled', false) # enable submits again diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee index a9ceed9e1..e75522433 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee @@ -740,7 +740,7 @@ class App.Sidebar extends App.Controller dir: App.i18n.dir() )) - # init sidebar badget + # init sidebar badge for item in itemsLocal el = localEl.find('.tabsSidebar-tab[data-tab="' + item.name + '"]') if item.badgeCallback diff --git a/app/assets/javascripts/app/controllers/_channel/facebook.coffee b/app/assets/javascripts/app/controllers/_channel/facebook.coffee index 10e1eabfb..72291b24b 100644 --- a/app/assets/javascripts/app/controllers/_channel/facebook.coffee +++ b/app/assets/javascripts/app/controllers/_channel/facebook.coffee @@ -167,7 +167,7 @@ class AppConfig extends App.ControllerModal onSubmit: (e) => @formDisable(e) - # verify app credentals + # verify app credentials @ajax( id: 'facebook_app_verify' type: 'POST' diff --git a/app/assets/javascripts/app/controllers/_channel/twitter.coffee b/app/assets/javascripts/app/controllers/_channel/twitter.coffee index 7495e5d14..1bcfc0a86 100644 --- a/app/assets/javascripts/app/controllers/_channel/twitter.coffee +++ b/app/assets/javascripts/app/controllers/_channel/twitter.coffee @@ -168,7 +168,7 @@ class AppConfig extends App.ControllerModal onSubmit: (e) => @formDisable(e) - # verify app credentals + # verify app credentials @ajax( id: 'twitter_app_verify' type: 'POST' diff --git a/app/assets/javascripts/app/controllers/_integration/ldap.coffee b/app/assets/javascripts/app/controllers/_integration/ldap.coffee index bda7e9c81..fc9bc0a12 100644 --- a/app/assets/javascripts/app/controllers/_integration/ldap.coffee +++ b/app/assets/javascripts/app/controllers/_integration/ldap.coffee @@ -351,7 +351,7 @@ class ConnectionWizard extends App.WizardModal @showAlert('js-bind', 'Unable to retrive group information, please check your bind user permissions.') return - # update config if successfull + # update config if successful for key, value of params @wizardConfig[key] = value diff --git a/app/assets/javascripts/app/controllers/_profile/avatar.coffee b/app/assets/javascripts/app/controllers/_profile/avatar.coffee index ea3dcd251..3fc76751d 100644 --- a/app/assets/javascripts/app/controllers/_profile/avatar.coffee +++ b/app/assets/javascripts/app/controllers/_profile/avatar.coffee @@ -28,7 +28,7 @@ class Index extends App.ControllerSubContent ) # check if the browser supports webcam access - # doesnt render the camera button if not + # doesn't render the camera button if not hasGetUserMedia: -> return !!(navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia) @@ -286,7 +286,7 @@ class Camera extends App.ControllerModal @shootButton.removeClass 'is-disabled' # in case the modal is closed before the - # request was fullfilled + # request was fulfilled if @hidden @stopStream() return @@ -316,7 +316,7 @@ class Camera extends App.ControllerModal onWebcamError: (error) => # in case the modal is closed before the - # request was fullfilled + # request was fulfilled if @hidden return @@ -348,7 +348,7 @@ class Camera extends App.ControllerModal updatePreview: => # try catch fixes a Firefox error # were the drawImage wouldn't work - # because the video didn't get inizialized + # because the video didn't get initialized # yet internally # http://stackoverflow.com/questions/18580844/firefox-drawimagevideo-fails-with-ns-error-not-available-component-is-not-av try diff --git a/app/assets/javascripts/app/controllers/_settings/area.coffee b/app/assets/javascripts/app/controllers/_settings/area.coffee index 6a1849ab4..f57b6b125 100644 --- a/app/assets/javascripts/app/controllers/_settings/area.coffee +++ b/app/assets/javascripts/app/controllers/_settings/area.coffee @@ -12,7 +12,7 @@ class App.SettingsArea extends App.Controller render: => - # serach area settings + # search area settings settings = App.Setting.search( filter: area: @area diff --git a/app/assets/javascripts/app/controllers/_settings/form.coffee b/app/assets/javascripts/app/controllers/_settings/form.coffee index fc496a365..b3e9b0b57 100644 --- a/app/assets/javascripts/app/controllers/_settings/form.coffee +++ b/app/assets/javascripts/app/controllers/_settings/form.coffee @@ -15,7 +15,7 @@ class App.SettingsForm extends App.Controller render: => - # serach area settings + # search area settings settings = App.Setting.search( filter: area: @area diff --git a/app/assets/javascripts/app/controllers/_ui_element/active.coffee b/app/assets/javascripts/app/controllers/_ui_element/active.coffee index 5df38ce0c..447627449 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/active.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/active.coffee @@ -18,7 +18,7 @@ class App.UiElement.active extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions(attribute, params) # return item diff --git a/app/assets/javascripts/app/controllers/_ui_element/autocompletion.coffee b/app/assets/javascripts/app/controllers/_ui_element/autocompletion.coffee index 11c2d9241..e0efa9a51 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/autocompletion.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/autocompletion.coffee @@ -21,7 +21,7 @@ class App.UiElement.autocompletion $(local_attribute).val(item.id).trigger('change') $(local_attribute + '_autocompletion_value_shown').val(item.value) - # call calback + # call callback if @callback params = App.ControllerForm.params(form) @callback(params) diff --git a/app/assets/javascripts/app/controllers/_ui_element/basedate.coffee b/app/assets/javascripts/app/controllers/_ui_element/basedate.coffee index 2603e6a10..c2ee4bb7c 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/basedate.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/basedate.coffee @@ -41,7 +41,7 @@ class App.UiElement.basedate @setNewTimeInitial(item, attribute) - # observer changes / update needed to forece rerender to get correct today shown + # observer changes / update needed to force rerender to get correct today shown @bindEvents: (item, attribute) -> item .find('input') diff --git a/app/assets/javascripts/app/controllers/_ui_element/boolean.coffee b/app/assets/javascripts/app/controllers/_ui_element/boolean.coffee index 56ebaca1b..e92aa84bd 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/boolean.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/boolean.coffee @@ -16,7 +16,7 @@ class App.UiElement.boolean extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions(attribute, params) item = $(App.view('generic/select')(attribute: attribute)) diff --git a/app/assets/javascripts/app/controllers/_ui_element/checkbox.coffee b/app/assets/javascripts/app/controllers/_ui_element/checkbox.coffee index 8341761ed..099f37e1b 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/checkbox.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/checkbox.coffee @@ -14,7 +14,7 @@ class App.UiElement.checkbox extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions( attribute, params ) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions( attribute, params ) # disable item of list diff --git a/app/assets/javascripts/app/controllers/_ui_element/ical_feed.coffee b/app/assets/javascripts/app/controllers/_ui_element/ical_feed.coffee index 252b5c7cb..f54ee7e1b 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/ical_feed.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/ical_feed.coffee @@ -25,7 +25,7 @@ class App.UiElement.ical_feed extends App.UiElement.ApplicationUiElement else item.find('.js-shadow').val( item.find('.js-list').val() ) - # set inital state + # set initial state if icalFeeds[attribute.value] updateCheckList() else diff --git a/app/assets/javascripts/app/controllers/_ui_element/postmaster_match.coffee b/app/assets/javascripts/app/controllers/_ui_element/postmaster_match.coffee index 2b0511cf9..99c052191 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/postmaster_match.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/postmaster_match.coffee @@ -172,7 +172,7 @@ class App.UiElement.postmaster_match @buildValue(item, elementRow, key, groups, undefined, operator, attribute) ) - # build inital params + # build initial params if _.isEmpty(params[attribute.name]) item.find('.js-filterElement .js-attributeSelector select').trigger('change') else diff --git a/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee b/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee index bcf475b37..ae28aae1c 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee @@ -154,7 +154,7 @@ class App.UiElement.postmaster_set @buildValue(item, elementRow, groupAndAttribute, groups, undefined, undefined, attribute) ) - # build inital params + # build initial params if _.isEmpty(params[attribute.name]) element = @placeholder(item, attribute, params, groups) item.append(element) diff --git a/app/assets/javascripts/app/controllers/_ui_element/radio.coffee b/app/assets/javascripts/app/controllers/_ui_element/radio.coffee index c84f7424d..337d6764e 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/radio.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/radio.coffee @@ -16,7 +16,7 @@ class App.UiElement.radio extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions(attribute, params) # disable item of list diff --git a/app/assets/javascripts/app/controllers/_ui_element/searchable_select.coffee b/app/assets/javascripts/app/controllers/_ui_element/searchable_select.coffee index e4d528a0e..d2b8f3664 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/searchable_select.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/searchable_select.coffee @@ -20,7 +20,7 @@ class App.UiElement.searchable_select extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions(attribute, params) # disable item of list diff --git a/app/assets/javascripts/app/controllers/_ui_element/select.coffee b/app/assets/javascripts/app/controllers/_ui_element/select.coffee index 9352e8885..01b0692a3 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/select.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/select.coffee @@ -26,7 +26,7 @@ class App.UiElement.select extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions(attribute, params) # disable item of list diff --git a/app/assets/javascripts/app/controllers/_ui_element/select_search.coffee b/app/assets/javascripts/app/controllers/_ui_element/select_search.coffee index 2b53dd6d1..ba5a324db 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/select_search.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/select_search.coffee @@ -22,7 +22,7 @@ class App.UiElement.select_search extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions(attribute, params) # disable item of list diff --git a/app/assets/javascripts/app/controllers/_ui_element/sla_times.coffee b/app/assets/javascripts/app/controllers/_ui_element/sla_times.coffee index 46ebccdec..7679e6e66 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/sla_times.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/sla_times.coffee @@ -16,7 +16,7 @@ class App.UiElement.sla_times solution_time_in_text: @toText(params.solution_time) ) ) - # appliy hour picker + # apply hour picker item.find('.js-timeConvertFrom').timepicker( maxHours: 999 ) diff --git a/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee b/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee index c3ada47fc..3fa4725e0 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee @@ -16,7 +16,7 @@ class App.UiElement.ticket_perform_action name: 'Notification' model: 'Notification' - # megre config + # merge config elements = {} for groupKey, groupMeta of groups if !groupMeta.model || !App[groupMeta.model] @@ -99,7 +99,7 @@ class App.UiElement.ticket_perform_action @buildOperator(item, elementRow, groupAndAttribute, elements, {}, attribute) ) - # build inital params + # build initial params if _.isEmpty(params[attribute.name]) for groupAndAttribute in defaults diff --git a/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee b/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee index f46eac253..50b637484 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee @@ -140,7 +140,7 @@ class App.UiElement.ticket_selector @preview(item) ) - # build inital params + # build initial params if !_.isEmpty(params[attribute.name]) selectorExists = false for groupAndAttribute, meta of params[attribute.name] diff --git a/app/assets/javascripts/app/controllers/_ui_element/timezone.coffee b/app/assets/javascripts/app/controllers/_ui_element/timezone.coffee index 2f52e4cd7..76856499b 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/timezone.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/timezone.coffee @@ -20,7 +20,7 @@ class App.UiElement.timezone extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list @selectedOptions(attribute, params) attribute.tag = 'searchable_select' diff --git a/app/assets/javascripts/app/controllers/_ui_element/tree_select.coffee b/app/assets/javascripts/app/controllers/_ui_element/tree_select.coffee index 1962ab644..1fca17e41 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/tree_select.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/tree_select.coffee @@ -28,7 +28,7 @@ class App.UiElement.tree_select extends App.UiElement.ApplicationUiElement # sort attribute.options @sortOptions(attribute, params) - # finde selected/checked item of list + # find selected/checked item of list if attribute.options @optionsSelect(attribute.options, attribute.value) diff --git a/app/assets/javascripts/app/controllers/api.coffee b/app/assets/javascripts/app/controllers/api.coffee index fbc576f1c..0a325e3a5 100644 --- a/app/assets/javascripts/app/controllers/api.coffee +++ b/app/assets/javascripts/app/controllers/api.coffee @@ -20,7 +20,7 @@ class Index extends App.ControllerSubContent render: => - # serach area settings + # search area settings settings = App.Setting.search( filter: area: 'API::Base' diff --git a/app/assets/javascripts/app/controllers/chat.coffee b/app/assets/javascripts/app/controllers/chat.coffee index 7414c4c12..f677953f8 100644 --- a/app/assets/javascripts/app/controllers/chat.coffee +++ b/app/assets/javascripts/app/controllers/chat.coffee @@ -214,7 +214,7 @@ class App.CustomerChat extends App.Controller preferences = @Session.get('preferences') if App.Chat.first() && !preferences || !preferences.chat || !preferences.chat.active || _.isEmpty(preferences.chat.active) - # if we only have one chat, avtice it automatically + # if we only have one chat, active it automatically if App.Chat.count() < 2 preferences.chat = {} preferences.chat.active = {} diff --git a/app/assets/javascripts/app/controllers/knowledge_base/content_can_be_published_form.coffee b/app/assets/javascripts/app/controllers/knowledge_base/content_can_be_published_form.coffee index 4d223ed63..d4eaba5c8 100644 --- a/app/assets/javascripts/app/controllers/knowledge_base/content_can_be_published_form.coffee +++ b/app/assets/javascripts/app/controllers/knowledge_base/content_can_be_published_form.coffee @@ -63,7 +63,7 @@ class App.KnowledgeBaseContentCanBePublishedForm extends App.ControllerForm @form.find('[data-attribute-name="scheduled"]').remove() @datePicker.datepicker('setStartDate', new Date()) - # add scheduled tiemr widgets + # add scheduled timer widgets now = new Date() for state in @states diff --git a/app/assets/javascripts/app/controllers/layout_ref.coffee b/app/assets/javascripts/app/controllers/layout_ref.coffee index 85c367069..226395d90 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.coffee @@ -847,7 +847,7 @@ class TicketZoomRef extends App.ControllerContent if highlights = localStorage['highlights'] @highlighter.deserialize localStorage['highlights'] - # the serialization creates one string for the entiery ticket + # the serialization creates one string for the entire ticket # containing the offsets and the highlight classes # # we have to check how it works with having open several tickets – it might break diff --git a/app/assets/javascripts/app/controllers/navigation.coffee b/app/assets/javascripts/app/controllers/navigation.coffee index 3f3c05ab3..b311edbf5 100644 --- a/app/assets/javascripts/app/controllers/navigation.coffee +++ b/app/assets/javascripts/app/controllers/navigation.coffee @@ -82,7 +82,7 @@ class App.Navigation extends App.ControllerWidgetPermanent renderMenu: => items = @getItems(navbar: @Config.get('NavBar')) - # apply counter and switch info from persistant controllers (if exists) + # apply counter and switch info from persistent controllers (if exists) activeTab = {} itemsNew = [] for item in items @@ -111,7 +111,7 @@ class App.Navigation extends App.ControllerWidgetPermanent itemsNew.push item items = itemsNew - # get open tabs to repopen on rerender + # get open tabs to reopen on rerender openTab = {} @$('.open').children('a').each( (i,d) -> href = $(d).attr('href') @@ -151,7 +151,7 @@ class App.Navigation extends App.ControllerWidgetPermanent item.target = item.child[0].target delete item.child - # get open tabs to repopen on rerender + # get open tabs to reopen on rerender openTab = {} @$('.open').children('a').each( (i,d) -> href = $(d).attr('href') @@ -366,7 +366,7 @@ class App.Navigation extends App.ControllerWidgetPermanent sub = @getOrder(dropdown[ item.parent ]) itemLevel1.child = sub - # clean up, only show navbar items with existing childrens + # clean up, only show navbar items with existing children clean_list = [] for item in level1 if !item.child || item.child && !_.isEmpty(item.child) diff --git a/app/assets/javascripts/app/controllers/password_reset.coffee b/app/assets/javascripts/app/controllers/password_reset.coffee index 93e6ad899..ea392d9aa 100644 --- a/app/assets/javascripts/app/controllers/password_reset.coffee +++ b/app/assets/javascripts/app/controllers/password_reset.coffee @@ -12,7 +12,7 @@ class Index extends App.ControllerContent @navigate '#' return - # if we are logged in, no passwort reset is wanted, redirect to app + # if we are logged in, no password reset is wanted, redirect to app if @authenticateCheck() @navigate '#' return diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index c5a9abd88..ef81b5640 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -34,7 +34,7 @@ class App.TicketZoom extends App.Controller if cache @load(cache) - # check if ticket has beed updated every 30 min + # check if ticket has been updated every 30 min update = => if !@initFetched @fetch() @@ -74,7 +74,7 @@ class App.TicketZoom extends App.Controller #console.log('debug no fetch, current ticket already there or requested') return if new Date(data.updated_at).getTime() < new Date(@ticketUpdatedAtLastCall).getTime() - #console.log('debug no fetch, current ticket already newser or requested') + #console.log('debug no fetch, current ticket already newer or requested') return @ticketUpdatedAtLastCall = data.updated_at @@ -200,7 +200,7 @@ class App.TicketZoom extends App.Controller url: @url() id: @ticket_id - # set icon and tilte if defined + # set icon and title if defined if @taskIconClass meta.iconClass = @taskIconClass if @taskHead @@ -773,7 +773,7 @@ class App.TicketZoom extends App.Controller # for condition check ticket = App.Ticket.fullLocal(@ticket_id) - # reset article - should not be resubmited on next ticket update + # reset article - should not be resubmitted on next ticket update ticket.article = undefined # update ticket attributes @@ -903,7 +903,7 @@ class App.TicketZoom extends App.Controller #App.SessionStorage.set(@key, data) @load(data, true, true) - # reset article - should not be resubmited on next ticket update + # reset article - should not be resubmitted on next ticket update ticket.article = undefined # reset form after save diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_action/email_reply.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_action/email_reply.coffee index f8761af0f..d5ca6a00f 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_action/email_reply.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_action/email_reply.coffee @@ -46,7 +46,7 @@ class EmailReply extends App.Controller if !localAddress foreignRecipients.push recipient - # check if reply all is neede + # check if reply all is needed if foreignRecipients.length > 1 actions.push { name: 'reply all' diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee index 4a600ac68..f8551aa6a 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee @@ -278,7 +278,7 @@ class App.TicketZoomArticleNew extends App.Controller if config && config.params params = config.params(params.type, params, @) - # add initals? + # add initials? for articleType in @articleTypes if articleType.name is @type if _.contains(articleType.features, 'body:initials') diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee index dd464b904..747898603 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee @@ -133,7 +133,7 @@ class ArticleViewItem extends App.ObserverController for attachment in article.attachments attachment.url = "#{App.Config.get('api_path')}/ticket_attachment/#{article.ticket_id}/#{article.id}/#{attachment.id}?disposition=attachment" attachment.preview_url = "#{App.Config.get('api_path')}/ticket_attachment/#{article.ticket_id}/#{article.id}/#{attachment.id}?view=preview" - + if attachment && attachment.preferences && attachment.preferences['original-format'] is true link = url: "#{App.Config.get('api_path')}/ticket_attachment/#{article.ticket_id}/#{article.id}/#{attachment.id}?disposition=attachment" @@ -159,7 +159,7 @@ class ArticleViewItem extends App.ObserverController bodyHtml = App.Utils.text2html(article.body) article['html'] = App.Utils.signatureIdentifyByPlaintext(bodyHtml) - # if no signature detected or within frist 25 lines, check if signature got detected in backend + # if no signature detected or within first 25 lines, check if signature got detected in backend if article['html'] is bodyHtml || (article.preferences && article.preferences.signature_detection < 25) signatureDetected = false body = article.body @@ -245,7 +245,7 @@ class ArticleViewItem extends App.ObserverController bubbleContent.css('height', 'auto') return - # reset bubble heigth and "see more" opacity + # reset bubble height and "see more" opacity bubbleContent.css('height', '') bubbleOverflowContainer.css('opacity', '') @@ -256,19 +256,19 @@ class ArticleViewItem extends App.ObserverController offsetTop = signatureMarker.position() # safari - workaround - # in safari somethimes the marker is directly on top via .top and inspector but it isn't + # in safari sometimes the marker is directly on top via .top and inspector but it isn't # in this case use the next element if offsetTop && offsetTop.top is 0 offsetTop = signatureMarker.next('div, p, br').position() - # remember bubble content heigth + # remember bubble content height bubbleContentHeigth = bubbleContent.height() - # get marker heigth + # get marker height if offsetTop markerHeight = offsetTop.top - # if signature marker exists and heigth is within maxHeight + # if signature marker exists and height is within maxHeight if markerHeight && markerHeight < maxHeight newHeigth = markerHeight + 30 if newHeigth < minHeight @@ -279,7 +279,7 @@ class ArticleViewItem extends App.ObserverController bubbleContent.css('height', "#{newHeigth}px") bubbleOverflowContainer.removeClass('hide') - # if heigth is higher then maxHeight + # if height is higher then maxHeight else if bubbleContentHeigth > maxHeight bubbleContent.attr('data-height', bubbleContentHeigth + 30) bubbleContent.attr('data-height-origin', maxHeight) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee index 5aa77a689..36352ef05 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee @@ -91,7 +91,7 @@ class App.TicketZoomHighlighter extends App.Controller articles.off('mousedown', @onMouseDown) articles.on('mousedown', @onMouseDown) #future: touchend - # for testing purposes the highlights get stored in atrticle preferences + # for testing purposes the highlights get stored in article preferences loadHighlights: (ticket_article_id) -> return if !@permissionCheck('ticket.agent') article = App.TicketArticle.find(ticket_article_id) @@ -103,7 +103,7 @@ class App.TicketZoomHighlighter extends App.Controller @currentHighlights[ticket_article_id] = article.preferences.highlight @highlighter.deserialize(article.preferences.highlight) - # the serialization creates one string for the entiery ticket + # the serialization creates one string for the entire ticket # containing the offsets and the highlight classes # # we have to check how it works with having open several tickets - it might break diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/title.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/title.coffee index 0952b6f18..013199454 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/title.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/title.coffee @@ -23,7 +23,7 @@ class App.TicketZoomTitle extends App.ObserverController ticket = App.Ticket.find(@object_id) ticket.title = title - # reset article - should not be resubmited on next ticket update + # reset article - should not be resubmitted on next ticket update ticket.article = undefined ticket.save() diff --git a/app/assets/javascripts/app/controllers/widget/online_notification.coffee b/app/assets/javascripts/app/controllers/widget/online_notification.coffee index dc3375c90..bbca4f306 100644 --- a/app/assets/javascripts/app/controllers/widget/online_notification.coffee +++ b/app/assets/javascripts/app/controllers/widget/online_notification.coffee @@ -19,7 +19,7 @@ class App.OnlineNotificationWidget extends App.Controller constructor: -> super - # at runtime if a online notifiction has changed + # at runtime if an online notification has changed @bind('OnlineNotification::changed', => @delay( => @fetch() @@ -54,7 +54,7 @@ class App.OnlineNotificationWidget extends App.Controller @createContainer() - # rerender view, e. g. on langauge change + # rerender view, e.g. on language change @bind('ui:rerender', => @createContainer() 'online_notification' diff --git a/app/assets/javascripts/app/controllers/widget/session_taken_over.coffee b/app/assets/javascripts/app/controllers/widget/session_taken_over.coffee index 9519c65d2..a66e22720 100644 --- a/app/assets/javascripts/app/controllers/widget/session_taken_over.coffee +++ b/app/assets/javascripts/app/controllers/widget/session_taken_over.coffee @@ -5,7 +5,7 @@ class Widget extends App.Controller bind: -> - # only do take over check after spool messages are finised + # only do takeover check after spool messages are finished App.Event.bind( 'spool:sent' => @@ -36,7 +36,7 @@ class Widget extends App.Controller # check if error message is already shown if !@error - # only if new client id isnt own client id + # only if new client id isn't own client id if data.taskbar_id isnt App.TaskManager.TaskbarId() @error = new App.SessionMessage( head: 'Session' diff --git a/app/assets/javascripts/app/controllers/widget/switch_back_to_user.coffee b/app/assets/javascripts/app/controllers/widget/switch_back_to_user.coffee index 612d9cbe4..b5b026afd 100644 --- a/app/assets/javascripts/app/controllers/widget/switch_back_to_user.coffee +++ b/app/assets/javascripts/app/controllers/widget/switch_back_to_user.coffee @@ -7,7 +7,7 @@ class Widget extends App.ControllerWidgetOnDemand @bind 'app:ready', => @render() - # e. g. if language has chnaged + # e.g. if language has changed @bind 'ui:rerender', => @render() diff --git a/app/assets/javascripts/app/controllers/widget/ticket_stats.coffee b/app/assets/javascripts/app/controllers/widget/ticket_stats.coffee index 843bf89d5..3e6a3f44f 100644 --- a/app/assets/javascripts/app/controllers/widget/ticket_stats.coffee +++ b/app/assets/javascripts/app/controllers/widget/ticket_stats.coffee @@ -18,7 +18,7 @@ class App.TicketStats extends App.Controller else if @organization @subscribeIdOrganization = App.Organization.full(@organization.id, @load, false, true) - # rerender view, e. g. on langauge change + # rerender view, e.g. on language change @bind 'ui:rerender', => return if !@authenticateCheck() @render() diff --git a/app/assets/javascripts/app/models/_application_model.coffee b/app/assets/javascripts/app/models/_application_model.coffee index 12631a50c..4e01764eb 100644 --- a/app/assets/javascripts/app/models/_application_model.coffee +++ b/app/assets/javascripts/app/models/_application_model.coffee @@ -83,7 +83,7 @@ class App.Model extends Spine.Model @validate: (data = {}) -> - # based on model attrbutes + # based on model attributes if App[ data['model'] ] && App[ data['model'] ].attributesGet attributes = App[ data['model'] ].attributesGet(data['screen']) @@ -338,7 +338,7 @@ set new attributes of model (remove already available attributes) # localOrServer can be: # change -> has changed local - # destroy -> has beed removed local or remote + # destroy -> has been removed local or remote # refresh -> has been changed remote params = @@ -456,7 +456,7 @@ set new attributes of model (remove already available attributes) 'change' (items) => - # check if result is array or singel item + # check if result is array or single item if !_.isArray(items) items = [items] App.Log.debug('Model', "local change #{@className}", items) @@ -468,7 +468,7 @@ set new attributes of model (remove already available attributes) 'destroy' (items) => - # check if result is array or singel item + # check if result is array or single item if !_.isArray(items) items = [items] App.Log.debug('Model', "local destroy #{@className}", items) @@ -482,7 +482,7 @@ set new attributes of model (remove already available attributes) 'refresh' (items) => - # check if result is array or singel item + # check if result is array or single item if !_.isArray(items) items = [items] App.Log.debug('Model', "local refresh #{@className}", items) @@ -563,7 +563,7 @@ set new attributes of model (remove already available attributes) App.Model.fetchFull( @callback clear: true - force: false # only do server call if no record exsits + force: false # only do server call if no record exists ) @@ -606,7 +606,7 @@ set new attributes of model (remove already available attributes) if data.assets App.Collection.loadAssets(data.assets, targetModel: @className) - # in case of no record_ids are there, no inital render is fired + # if no record_ids are found, no initial render is fired if data.record_ids && _.isEmpty(data.record_ids) App[@className].trigger('refresh', []) diff --git a/app/assets/javascripts/app/models/user.coffee b/app/assets/javascripts/app/models/user.coffee index c650bcce4..f4ebc5192 100644 --- a/app/assets/javascripts/app/models/user.coffee +++ b/app/assets/javascripts/app/models/user.coffee @@ -128,7 +128,7 @@ class App.User extends App.Model @_fillUp: (data) -> - # set socal media links + # set social media links if data['accounts'] for account of data['accounts'] if account == 'twitter' @@ -238,7 +238,7 @@ class App.User extends App.Model if permission_key.substr(0, length) is requiredPermission.substr(0, length) localAccess = true - # verify name.explicite permissions + # verify name.explicit permissions if !localAccess for part in parts if partString isnt '' diff --git a/app/controllers/application_controller/handles_devices.rb b/app/controllers/application_controller/handles_devices.rb index 8fc15b278..400565aae 100644 --- a/app/controllers/application_controller/handles_devices.rb +++ b/app/controllers/application_controller/handles_devices.rb @@ -13,7 +13,7 @@ module ApplicationController::HandlesDevices def user_device_log(user, type) switched_from_user_id = ENV['SWITCHED_FROM_USER_ID'] || session[:switched_from_user_id] - return true if params[:controller] == 'init' # do no device logging on static inital page + return true if params[:controller] == 'init' # do no device logging on static initial page return true if switched_from_user_id return true if !user return true if !user.permissions?('user_preferences.device') diff --git a/app/controllers/channels_email_controller.rb b/app/controllers/channels_email_controller.rb index 1ec95d1ef..beb06fb66 100644 --- a/app/controllers/channels_email_controller.rb +++ b/app/controllers/channels_email_controller.rb @@ -104,7 +104,7 @@ class ChannelsEmailController < ApplicationController # check account duplicate return if account_duplicate?({ setting: { inbound: params[:inbound] } }, channel_id) - # check delivery for 30 sek. + # check delivery for 30 sec. result = EmailHelper::Verify.email( outbound: params[:outbound].to_h, inbound: params[:inbound].to_h, @@ -158,7 +158,7 @@ class ChannelsEmailController < ApplicationController # remember address && set channel for email address address = EmailAddress.find_by(email: email) - # if we are on initial setup, use already exisiting dummy email address + # on initial setup, use placeholder email address if Channel.count == 1 address = EmailAddress.first end diff --git a/app/controllers/integration/cti_controller.rb b/app/controllers/integration/cti_controller.rb index 0973befda..dc926e077 100644 --- a/app/controllers/integration/cti_controller.rb +++ b/app/controllers/integration/cti_controller.rb @@ -18,7 +18,7 @@ class Integration::CtiController < ApplicationController return true end - # check if oubound call change the outbound caller_id + # check if outbound call changes the outbound caller_id if result[:action] == 'set_caller_id' data = { action: 'dial', diff --git a/app/controllers/integration/placetel_controller.rb b/app/controllers/integration/placetel_controller.rb index 21cdc209d..edefc8be8 100644 --- a/app/controllers/integration/placetel_controller.rb +++ b/app/controllers/integration/placetel_controller.rb @@ -20,7 +20,7 @@ class Integration::PlacetelController < ApplicationController return true end - # check if oubound call change the outbound caller_id + # check if outbound call changes the outbound caller_id if result[:action] == 'set_caller_id' response_set_caller_id(result) return true diff --git a/app/controllers/integration/sipgate_controller.rb b/app/controllers/integration/sipgate_controller.rb index b5680b4c2..b4ab68284 100644 --- a/app/controllers/integration/sipgate_controller.rb +++ b/app/controllers/integration/sipgate_controller.rb @@ -20,7 +20,7 @@ class Integration::SipgateController < ApplicationController return true end - # check if oubound call change the outbound caller_id + # check if outbound call changes the outbound caller_id if result[:action] == 'set_caller_id' response_set_caller_id(result) return true diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 5ae438bbf..8376799bc 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -241,7 +241,7 @@ class SessionsController < ApplicationController # "switch" back to user def switch_back_to_user - # check if it's a swich back + # check if it's a switch back raise Exceptions::NotAuthorized if !session[:switched_from_user_id] user = User.lookup(id: session[:switched_from_user_id]) @@ -253,7 +253,7 @@ class SessionsController < ApplicationController return false end - # rememeber current user + # remember current user current_session_user = current_user # remove switched_from_user_id @@ -321,7 +321,7 @@ class SessionsController < ApplicationController config[setting.name] = value end - # remember if we can to swich back to user + # remember if we can switch back to user if session[:switched_from_user_id] config['switch_back_to_possible'] = true end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1bca0d47f..93639e24e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -115,7 +115,7 @@ class UsersController < ApplicationController clean_params = User.param_cleanup(clean_params, true) # check if it's first user, the admin user - # inital admin account + # initial admin account count = User.all.count admin_account_exists = true if count <= 2 @@ -168,7 +168,7 @@ class UsersController < ApplicationController user.group_ids = group_ids # remember source (in case show email verify banner) - # if not inital user creation + # if not initial user creation if admin_account_exists user.source = 'signup' end @@ -205,7 +205,7 @@ class UsersController < ApplicationController end end - # send inviteation if needed / only if session exists + # send invitation if needed / only if session exists if params[:invite].present? && current_user sleep 5 if ENV['REMOTE_URL'].present? token = Token.create(action: 'PasswordReset', user_id: user.id) @@ -321,7 +321,7 @@ class UsersController < ApplicationController # @path [GET] /users/me # # @summary Returns the User record of current user. - # @notes The requestor need to have a valid authentication. + # @notes The requester needs to have a valid authentication. # # @parameter full [Bool] If set a Asset structure with all connected Assets gets returned. # diff --git a/app/models/activity_stream.rb b/app/models/activity_stream.rb index a4bf6c7e7..2d824e84f 100644 --- a/app/models/activity_stream.rb +++ b/app/models/activity_stream.rb @@ -61,7 +61,7 @@ add a new activity entry for an object created_by_id: data[:created_by_id] ).order(created_at: :desc).first - # resturn if old entry is really fresh + # return if old entry is really fresh if result activity_record_delay = 90.seconds return result if result.created_at.to_i >= ( data[:created_at].to_i - activity_record_delay ) diff --git a/app/models/application_model/can_associations.rb b/app/models/application_model/can_associations.rb index 91b261552..95f55f7ce 100644 --- a/app/models/application_model/can_associations.rb +++ b/app/models/application_model/can_associations.rb @@ -235,7 +235,7 @@ returns end def filter_attributes(attributes) - # remove forbitten attributes + # remove forbidden attributes %w[password token tokens token_ids].each do |item| attributes.delete(item) end @@ -291,7 +291,7 @@ returns =begin -serve methode to ignore model attribute associations +serve method to ignore model attribute associations class Model < ApplicationModel include AssociationConcern diff --git a/app/models/application_model/can_lookup.rb b/app/models/application_model/can_lookup.rb index f93d37d0e..5a71f6225 100644 --- a/app/models/application_model/can_lookup.rb +++ b/app/models/application_model/can_lookup.rb @@ -36,7 +36,7 @@ return possible lookup keys for model returns - [:id, :name] # or fror users [:id, :login, :email] + [:id, :name] # or, for users: [:id, :login, :email] =end diff --git a/app/models/application_model/can_query_case_insensitive_where_or_sql.rb b/app/models/application_model/can_query_case_insensitive_where_or_sql.rb index 8255381b2..5f321cc07 100644 --- a/app/models/application_model/can_query_case_insensitive_where_or_sql.rb +++ b/app/models/application_model/can_query_case_insensitive_where_or_sql.rb @@ -4,7 +4,7 @@ module ApplicationModel::CanQueryCaseInsensitiveWhereOrSql included do - # Builds a case insenstive WHERE ... OR ... SQL query. + # Builds a case-insensitive WHERE ... OR ... SQL query. # # @see .or_cis # @@ -19,10 +19,10 @@ module ApplicationModel::CanQueryCaseInsensitiveWhereOrSql # methods defined here are going to extend the class, not the instance of it class_methods do - # Builds a case insenstive OR SQL grouping. This comes in handy for join queries. + # Builds a case-insensitive OR SQL grouping. This comes in handy for join queries. # For direct WHERE queries prefer .where_or_cis scope. # - # @param [Array] attributes the attributes that should get queried case insensitive. Strings or Arel attributes + # @param [Array] attributes the attributes that should get queried case-insensitive. Strings or Arel attributes # @param [String] query the SQL query that should be used for each given attribute. # # @example @@ -30,7 +30,7 @@ module ApplicationModel::CanQueryCaseInsensitiveWhereOrSql # # @return [Arel::Nodes::Grouping] can be passed to ActiveRecord queries def or_cis(attributes, query) - # use Arel to create an Array of case insenstive + # use Arel to create an Array of case-insensitive # LIKE queries based on the current DB adapter cis_matches = attributes .map do |attribute| diff --git a/app/models/avatar.rb b/app/models/avatar.rb index 8cea318cd..fbd827e81 100644 --- a/app/models/avatar.rb +++ b/app/models/avatar.rb @@ -126,7 +126,7 @@ add avatar by url elsif data[:url].to_s.match?(%r{^https?://}) url = data[:url].to_s - # check if source ist already updated within last 2 minutes + # check if source was updated within last 2 minutes if avatar_already_exists&.source_url == url return if avatar_already_exists.updated_at > 2.minutes.ago end diff --git a/app/models/calendar.rb b/app/models/calendar.rb index f8a0f92c9..a347977ef 100644 --- a/app/models/calendar.rb +++ b/app/models/calendar.rb @@ -15,7 +15,7 @@ class Calendar < ApplicationModel =begin -set inital default calendar +set initial default calendar calendar = Calendar.init_setup @@ -30,7 +30,7 @@ returns calendar object ip = nil end - # prevent multible setups for same ip + # prevent multiple setups for same ip cache = Cache.get('Calendar.init_setup.done') return if cache && cache[:ip] == ip diff --git a/app/models/channel/filter/auto_response_check.rb b/app/models/channel/filter/auto_response_check.rb index ed7be0c86..9fec214c6 100644 --- a/app/models/channel/filter/auto_response_check.rb +++ b/app/models/channel/filter/auto_response_check.rb @@ -14,14 +14,14 @@ module Channel::Filter::AutoResponseCheck mail[ 'x-zammad-article-preferences'.to_sym ]['send-auto-response'] = false mail[ 'x-zammad-article-preferences'.to_sym ]['is-auto-response'] = true - # do not send an auto respondse if one of the following headers exists + # do not send an auto response if one of the following headers exists return if mail[ 'list-unsubscribe'.to_sym ] && mail[ 'list-unsubscribe'.to_sym ] =~ /.../ return if mail[ 'x-loop'.to_sym ] && mail[ 'x-loop'.to_sym ] =~ /(yes|true)/i return if mail[ 'precedence'.to_sym ] && mail[ 'precedence'.to_sym ] =~ /(bulk|list|junk)/i return if mail[ 'auto-submitted'.to_sym ] && mail[ 'auto-submitted'.to_sym ] =~ /auto-(generated|replied)/i return if mail[ 'x-auto-response-suppress'.to_sym ] && mail[ 'x-auto-response-suppress'.to_sym ] =~ /all/i - # do not send an auto respondse if sender is system it self + # do not send an auto response if sender is system itself message_id = mail[ 'message_id'.to_sym ] if message_id fqdn = Setting.get('fqdn') diff --git a/app/models/channel/filter/follow_up_check.rb b/app/models/channel/filter/follow_up_check.rb index 3f8d2469e..26181a28c 100644 --- a/app/models/channel/filter/follow_up_check.rb +++ b/app/models/channel/filter/follow_up_check.rb @@ -68,7 +68,7 @@ module Channel::Filter::FollowUpCheck end end - # get ticket# from references current email has same subject as inital article + # get ticket# from references current email has same subject as initial article if mail[:subject].present? # get all references 'References' + 'In-Reply-To' diff --git a/app/models/channel/filter/identify_sender.rb b/app/models/channel/filter/identify_sender.rb index 14990f0b4..21ed211a3 100644 --- a/app/models/channel/filter/identify_sender.rb +++ b/app/models/channel/filter/identify_sender.rb @@ -116,7 +116,7 @@ module Channel::Filter::IdentifySender return false if current_count == max_count end rescue => e - # parse not parseable fields by mail gem like + # parse not parsable fields by mail gem like # - Max Kohl | [example.com] # - Max Kohl Rails.logger.error 'ERROR: ' + e.inspect diff --git a/app/models/channel/filter/monitoring_base.rb b/app/models/channel/filter/monitoring_base.rb index 13ccd3c76..9d1f52b40 100644 --- a/app/models/channel/filter/monitoring_base.rb +++ b/app/models/channel/filter/monitoring_base.rb @@ -30,7 +30,7 @@ class Channel::Filter::MonitoringBase # check if sender is monitoring return if !Channel::Filter::Match::EmailRegex.match(value: mail[:from], match_rule: sender, check_mode: true) - # get mail attibutes like host and state + # get mail attributes like host and state result = {} mail[:body].gsub(%r{(Service|Host|State|Address|Date/Time|Additional\sInfo|Info|Action|Description):(.+?)(\n|$)}i) do |_match| @@ -118,7 +118,7 @@ class Channel::Filter::MonitoringBase end end - # ignorte states + # ignore states if state_ignore_match.present? && result['state'].present? && result['state'].match(/#{state_ignore_match}/i) mail[ 'x-zammad-ignore'.to_sym ] = true return true diff --git a/app/models/chat.rb b/app/models/chat.rb index d94bc1988..88e1a18c3 100644 --- a/app/models/chat.rb +++ b/app/models/chat.rb @@ -25,7 +25,7 @@ class Chat < ApplicationModel avatar: url, } - # get queue postion if needed + # get queue position if needed session = Chat::Session.messages_by_session_id(session_id) if session return { @@ -174,7 +174,7 @@ broadcast new agent status to all agents Chat.broadcast_agent_state_update -optional you can ignore it for dedecated user +optional you can ignore it for dedicated user Chat.broadcast_agent_state_update(ignore_user_id) @@ -243,7 +243,7 @@ optional you can put the max oldest chat entries =begin -close chat sessions where participients are offline +close chat sessions where participants are offline Chat.cleanup_close diff --git a/app/models/concerns/can_csv_import.rb b/app/models/concerns/can_csv_import.rb index f8b17e6d0..d1a5fe7df 100644 --- a/app/models/concerns/can_csv_import.rb +++ b/app/models/concerns/can_csv_import.rb @@ -395,7 +395,7 @@ returns =begin -serve methode to ignore model based on id +serve method to ignore model based on id class Model < ApplicationModel include CanCsvImport @@ -410,7 +410,7 @@ end =begin -serve methode to ignore model attributes +serve method to ignore model attributes class Model < ApplicationModel include CanCsvImport @@ -433,7 +433,7 @@ end =begin -serve methode to define if delete option is possible or not +serve method to define if delete option is possible or not class Model < ApplicationModel include CanCsvImport diff --git a/app/models/concerns/has_activity_stream_log.rb b/app/models/concerns/has_activity_stream_log.rb index 6092e3b7b..7f0f0efce 100644 --- a/app/models/concerns/has_activity_stream_log.rb +++ b/app/models/concerns/has_activity_stream_log.rb @@ -68,7 +68,7 @@ delete object activity stream, will be executed automatically =begin -serve methode to ignore model attributes in activity stream and/or limit activity stream permission +serve method to ignore model attributes in activity stream and/or limit activity stream permission class Model < ApplicationModel include HasActivityStreamLog diff --git a/app/models/concerns/has_history.rb b/app/models/concerns/has_history.rb index 2ea369468..4962b2784 100644 --- a/app/models/concerns/has_history.rb +++ b/app/models/concerns/has_history.rb @@ -232,7 +232,7 @@ returns class_methods do =begin -serve methode to ignore model attributes in historization +serve method to ignore model attributes in historization class Model < ApplicationModel include HasHistory @@ -247,7 +247,7 @@ end =begin -serve methode to ignore model attributes in historization +serve method to ignore model attributes in historization class Model < ApplicationModel include HasHistory diff --git a/app/models/concerns/has_search_index_backend.rb b/app/models/concerns/has_search_index_backend.rb index 31b37d412..b2e4c3b48 100644 --- a/app/models/concerns/has_search_index_backend.rb +++ b/app/models/concerns/has_search_index_backend.rb @@ -106,7 +106,7 @@ returns =begin -serve methode to ignore model attributes in search index +serve method to ignore model attributes in search index class Model < ApplicationModel include HasSearchIndexBackend diff --git a/app/models/cti/driver/base.rb b/app/models/cti/driver/base.rb index 94b936710..0e74c1448 100644 --- a/app/models/cti/driver/base.rb +++ b/app/models/cti/driver/base.rb @@ -11,7 +11,7 @@ class Cti::Driver::Base def process - # validate diections + # validate directions result = direction_check return result if result.present? @@ -36,10 +36,10 @@ class Cti::Driver::Base log = Cti::Log.process(@params) - # push new call notifiation + # push new call notification push_incoming_call(log) - # open screen if call got answerd + # open screen if call got answered push_open_ticket_screen(log) result || {} @@ -47,7 +47,7 @@ class Cti::Driver::Base def direction_check - # check possible diections + # check possible directions if @params['direction'] != 'in' && @params['direction'] != 'out' return { action: 'invalid_direction', diff --git a/app/models/cti/log.rb b/app/models/cti/log.rb index 3ca750ef0..fe3ca2e2d 100644 --- a/app/models/cti/log.rb +++ b/app/models/cti/log.rb @@ -512,7 +512,7 @@ optional you can put the max oldest chat entries as argument =begin -returnes queues of user +returns queues of user ['queue1', 'queue2'] = Cti::Log.queues_of_user(User.find(123), config) diff --git a/app/models/email_address.rb b/app/models/email_address.rb index 12bdc7129..b77b5cf1b 100644 --- a/app/models/email_address.rb +++ b/app/models/email_address.rb @@ -76,7 +76,7 @@ check and if channel not exists reset configured channels for email addresses end end - # keep email email address is of inital group filled + # keep email email address is of initial group filled def update_email_address_id not_configured = Group.where(email_address_id: nil).count total = Group.count diff --git a/app/models/job.rb b/app/models/job.rb index 3ab7b1eec..08553c85a 100644 --- a/app/models/job.rb +++ b/app/models/job.rb @@ -100,7 +100,7 @@ job.run(true) def executable?(start_at = Time.zone.now) return false if !active - # only execute jobs, older then 1 min, to give admin posibility to change + # only execute jobs older than 1 min to give admin time to make last-minute changes return false if updated_at > Time.zone.now - 1.minute # check if job got stuck diff --git a/app/models/knowledge_base/answer.rb b/app/models/knowledge_base/answer.rb index 212310a49..bad515b6c 100644 --- a/app/models/knowledge_base/answer.rb +++ b/app/models/knowledge_base/answer.rb @@ -67,7 +67,7 @@ class KnowledgeBase::Answer < ApplicationModel def reordering_callback return if !category_id_changed? && !position_changed? - # drop siblings cache to make sure orderign is always up to date + # drop siblings cache to make sure ordering is always up to date category.answers.each(&:cache_delete) end before_save :reordering_callback diff --git a/app/models/knowledge_base/category.rb b/app/models/knowledge_base/category.rb index e8c290768..97795ade5 100644 --- a/app/models/knowledge_base/category.rb +++ b/app/models/knowledge_base/category.rb @@ -124,7 +124,7 @@ class KnowledgeBase::Category < ApplicationModel def reordering_callback return if !parent_id_changed? && !position_changed? - # drop siblings cache to make sure orderign is always up to date + # drop siblings cache to make sure ordering is always up to date sibling_categories.each(&:cache_delete) end before_save :reordering_callback diff --git a/app/models/observer/organization/ref_object_touch.rb b/app/models/observer/organization/ref_object_touch.rb index c5e934d29..dd618f9d8 100644 --- a/app/models/observer/organization/ref_object_touch.rb +++ b/app/models/observer/organization/ref_object_touch.rb @@ -20,7 +20,7 @@ class Observer::Organization::RefObjectTouch < ActiveRecord::Observer # return if we run import mode return true if Setting.get('import_mode') - # featrue used for different propose, do not touch references + # feature used for different purpose; do not touch references return true if User.where(organization_id: record.id).count > 100 # touch organizations tickets diff --git a/app/models/observer/ticket/article/communicate_sms/background_job.rb b/app/models/observer/ticket/article/communicate_sms/background_job.rb index 2ace7cebb..57c3a42ea 100644 --- a/app/models/observer/ticket/article/communicate_sms/background_job.rb +++ b/app/models/observer/ticket/article/communicate_sms/background_job.rb @@ -13,7 +13,7 @@ class Observer::Ticket::Article::CommunicateSms::BackgroundJob ticket = Ticket.lookup(id: article.ticket_id) log_error(article, "Can't find article.preferences for Ticket::Article.find(#{article.id})") if !article.preferences - # if sender is system, take artile channel + # if sender is system, take article channel if article.sender.name == 'System' log_error(article, "Can't find article.preferences['sms_recipients'] for Ticket::Article.find(#{article.id})") if !article.preferences['sms_recipients'] log_error(article, "Can't find article.preferences['channel_id'] for Ticket::Article.find(#{article.id})") if !article.preferences['channel_id'] diff --git a/app/models/observer/ticket/article/fillup_from_email.rb b/app/models/observer/ticket/article/fillup_from_email.rb index 5d061e397..4ba9cf032 100644 --- a/app/models/observer/ticket/article/fillup_from_email.rb +++ b/app/models/observer/ticket/article/fillup_from_email.rb @@ -35,7 +35,7 @@ class Observer::Ticket::Article::FillupFromEmail < ActiveRecord::Observer # clean subject record.subject = ticket.subject_clean(record.subject) - # generate message id, force it in prodution, in test allow to set it for testing reasons + # generate message id, force it in production, in test allow to set it for testing reasons if !record.message_id || Rails.env.production? fqdn = Setting.get('fqdn') record.message_id = "<#{DateTime.current.to_s(:number)}.#{record.ticket_id}.#{rand(999_999_999_999)}@#{fqdn}>" diff --git a/app/models/observer/ticket/article_changes.rb b/app/models/observer/ticket/article_changes.rb index 7fa1e1356..8f337e1cb 100644 --- a/app/models/observer/ticket/article_changes.rb +++ b/app/models/observer/ticket/article_changes.rb @@ -55,7 +55,7 @@ class Observer::Ticket::ArticleChanges < ActiveRecord::Observer true end - # set frist response + # set first response def first_response_at_update(record) # return if we run import mode @@ -123,7 +123,7 @@ class Observer::Ticket::ArticleChanges < ActiveRecord::Observer return true end - # if customer is sending agains, ignore update of last contact (usecase of update escalation) + # if customer is sending again, ignore update of last contact (use case of update escalation) return false if ticket.last_contact_customer_at && ticket.last_contact_at && ticket.last_contact_customer_at == ticket.last_contact_at diff --git a/app/models/observer/transaction.rb b/app/models/observer/transaction.rb index 77fe2bad2..7da56c69a 100644 --- a/app/models/observer/transaction.rb +++ b/app/models/observer/transaction.rb @@ -29,7 +29,7 @@ class Observer::Transaction < ActiveRecord::Observer # reset buffer EventBuffer.reset('transaction') - # get asyn backends + # get async backends sync_backends = [] Setting.where(area: 'Transaction::Backend::Sync').order(:name).each do |setting| backend = Setting.get(setting.name) diff --git a/app/models/online_notification.rb b/app/models/online_notification.rb index bc3f79ff5..958225b38 100644 --- a/app/models/online_notification.rb +++ b/app/models/online_notification.rb @@ -177,7 +177,7 @@ mark online notification as seen by object =begin -check if all notifications are seed for dedecated object +check if all notifications are seen for dedicated object OnlineNotification.all_seen?('Ticket', 123) @@ -245,10 +245,10 @@ with dedicated times OnlineNotification.where('created_at < ?', max_age).delete_all OnlineNotification.where('seen = ? AND updated_at < ?', true, max_own_seen).each do |notification| - # delete own "seen" notificatons after 1 hour + # delete own "seen" notifications after 1 hour next if notification.user_id == notification.updated_by_id && notification.updated_at > max_own_seen - # delete notificatons which are set to "seen" by somebody else after 8 hour + # delete notifications which are set to "seen" by somebody else after 8 hours next if notification.user_id != notification.updated_by_id && notification.updated_at > max_auto_seen notification.delete diff --git a/app/models/organization/assets.rb b/app/models/organization/assets.rb index 51dc06afb..d1bc00e4b 100644 --- a/app/models/organization/assets.rb +++ b/app/models/organization/assets.rb @@ -42,7 +42,7 @@ returns if local_attributes['member_ids'].present? - # featrue used for different propose, do limit references + # feature used for different purpose; do limit references if local_attributes['member_ids'].count > 100 local_attributes['member_ids'] = local_attributes['member_ids'].sort[0, 100] end diff --git a/app/models/overview.rb b/app/models/overview.rb index 7e4d285bb..bbea99ec6 100644 --- a/app/models/overview.rb +++ b/app/models/overview.rb @@ -44,7 +44,7 @@ class Overview < ApplicationModel rearranged_prio += 1 end - # don't start rearrange logic for overviews that alredy get rearranged + # don't start rearranging logic for overviews that have already been rearranged self.class.without_callback(:update, :before, :rearrangement) do # fetch and update overview only if prio needs to change overview = self.class.where( diff --git a/app/models/package.rb b/app/models/package.rb index 4b3a918e2..eae2a8671 100644 --- a/app/models/package.rb +++ b/app/models/package.rb @@ -117,7 +117,7 @@ note: will not take down package migrations, use Package.unlink instead execute migration down + unlink files - Package.unlink('/path/to/src/extention') + Package.unlink('/path/to/src/extension') =end @@ -153,7 +153,7 @@ execute migration down + unlink files link files + execute migration up - Package.link('/path/to/src/extention') + Package.link('/path/to/src/extension') =end @@ -220,7 +220,7 @@ or returns - package # record of new created packae + package # record of newly created package =end @@ -303,7 +303,7 @@ reinstall package returns - package # record of new created packae + package # record of newly created package =end @@ -330,7 +330,7 @@ or returns - package # record of new created packae + package # record of newly created package =end diff --git a/app/models/recent_view/assets.rb b/app/models/recent_view/assets.rb index 7cb120708..028485c23 100644 --- a/app/models/recent_view/assets.rb +++ b/app/models/recent_view/assets.rb @@ -6,7 +6,7 @@ class RecentView =begin -get all assets / related models for this recend view item +get all assets / related models for this recent view item recent_view = RecentView.find(123) result = recent_view.assets(assets_if_exists) diff --git a/app/models/scheduler.rb b/app/models/scheduler.rb index d10551f77..053060aff 100644 --- a/app/models/scheduler.rb +++ b/app/models/scheduler.rb @@ -36,7 +36,7 @@ class Scheduler < ApplicationModel logger.error "Can't reconnect to database #{e.inspect}" end - # read/load jobs and check if it is alredy started + # read/load jobs and check if each has already been started jobs = Scheduler.where('active = ?', true).order(prio: :asc) jobs.each do |job| @@ -56,7 +56,7 @@ class Scheduler < ApplicationModel # Checks if a Scheduler Job should get started or not. # The decision is based on if there is a running thread or not. - # Invalid threads get canceled and new threads can get started. + # Invalid threads get cancelled and new threads can get started. # # @param [Scheduler] job The job that should get checked for running threads. # diff --git a/app/models/store.rb b/app/models/store.rb index 56b966f96..03cfa1d01 100644 --- a/app/models/store.rb +++ b/app/models/store.rb @@ -297,7 +297,7 @@ returns return if image.width <= width # do not resize image if new height is smaller then 7px (images - # with small height are usally usefull to resize) + # with small height are usually useful to resize) ratio = image.width / width return if image.height / ratio <= 6 diff --git a/app/models/store/file.rb b/app/models/store/file.rb index c084ca338..faf38379d 100644 --- a/app/models/store/file.rb +++ b/app/models/store/file.rb @@ -68,7 +68,7 @@ file system check of store, check data and sha (in case fix it) Store::File.verify -read each file which should be in backend and verify agsinst sha hash +read each file which should be in backend and verify against sha hash in case of fixing sha hash use: diff --git a/app/models/tag.rb b/app/models/tag.rb index bf4af42f1..e5911279a 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -212,7 +212,7 @@ rename tag items old_tag_item = Tag::Item.find(data[:id]) already_existing_tag = Tag::Item.lookup(name: new_tag_name) - # check if no remame is needed + # check if no rename is needed return true if new_tag_name == old_tag_item.name # merge old with new tag if already existing diff --git a/app/models/ticket.rb b/app/models/ticket.rb index 3c4ba0f82..42cc680a9 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -30,7 +30,7 @@ class Ticket < ApplicationModel activity_stream_permission 'ticket.agent' - activity_stream_attributes_ignored :organization_id, # organization_id will channge automatically on user update + activity_stream_attributes_ignored :organization_id, # organization_id will change automatically on user update :create_article_type_id, :create_article_sender_id, :article_count, @@ -1195,11 +1195,11 @@ result get all articles of a ticket in correct order (overwrite active record default method) - artilces = ticket.articles + articles = ticket.articles result - [article1, articl2] + [article1, article2] =end @@ -1356,7 +1356,7 @@ result end next if skip_user - # send notifications only to email adresses + # send notifications only to email addresses next if recipient_email.blank? next if recipient_email !~ /@/ diff --git a/app/models/ticket/escalation.rb b/app/models/ticket/escalation.rb index f172943f2..3a834fd20 100644 --- a/app/models/ticket/escalation.rb +++ b/app/models/ticket/escalation.rb @@ -52,7 +52,7 @@ returns # return if we run import mode return if Setting.get('import_mode') && !Setting.get('import_ignore_sla') - # set escalation off if current state is not escalation relativ (e. g. ticket is closed) + # set escalation off if current state is not escalation relative (e.g. ticket is closed) return if !state_id state = Ticket::State.lookup(id: state_id) @@ -60,7 +60,7 @@ returns if state.ignore_escalation? escalation_disabled = true - # early exit if nothing current state is not escalation relativ + # early exit if nothing current state is not escalation relative if !force return false if escalation_at.nil? diff --git a/app/models/ticket/number.rb b/app/models/ticket/number.rb index 3e4db0cf8..fd80d902e 100644 --- a/app/models/ticket/number.rb +++ b/app/models/ticket/number.rb @@ -26,7 +26,7 @@ returns =begin -check if string contrains a valid ticket number +check if string contains a valid ticket number result = Ticket::Number.check('some string [Ticket#123456]') diff --git a/app/models/ticket/screen_options.rb b/app/models/ticket/screen_options.rb index 81e566824..3e52f2a3a 100644 --- a/app/models/ticket/screen_options.rb +++ b/app/models/ticket/screen_options.rb @@ -157,7 +157,7 @@ returns =begin -list tickets by customer groupd in state categroie open and closed +list tickets by customer group in state categories open and closed result = Ticket::ScreenOptions.list_by_customer( customer_id: 123, diff --git a/app/models/ticket/search_index.rb b/app/models/ticket/search_index.rb index 0acacead3..e8217bf1c 100644 --- a/app/models/ticket/search_index.rb +++ b/app/models/ticket/search_index.rb @@ -26,7 +26,7 @@ returns attributes[:tags] = tags end - # list ignored file extentions + # list ignored file extensions attachments_ignore = Setting.get('es_attachment_ignore') || [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe' ] # max attachment size diff --git a/app/models/ticket/subject.rb b/app/models/ticket/subject.rb index d3267eda2..12a307be3 100644 --- a/app/models/ticket/subject.rb +++ b/app/models/ticket/subject.rb @@ -17,7 +17,7 @@ returns def subject_build(subject, prefix_mode = nil) - # clena subject + # clean subject subject_parts = [subject_clean(subject)] # add hook diff --git a/app/models/transaction/notification.rb b/app/models/transaction/notification.rb index fa2d40e6f..5d99939e7 100644 --- a/app/models/transaction/notification.rb +++ b/app/models/transaction/notification.rb @@ -160,7 +160,7 @@ class Transaction::Notification Rails.logger.debug { "sent ticket online notifiaction to agent (#{@item[:type]}/#{ticket.id}/#{user.email})" } end - # ignore email channel notificaiton and empty emails + # ignore email channel notification and empty emails if !channels['email'] || !user.email || user.email == '' add_recipient_list(ticket, user, used_channels, @item[:type]) next @@ -270,7 +270,7 @@ class Transaction::Notification changes[attribute_name] = value end - # if changed item is an _id field/reference, do an lookup for the realy values + # if changed item is an _id field/reference, look up the real values value_id = [] value_str = [ value[0], value[1] ] if key.to_s[-3, 3] == '_id' @@ -302,7 +302,7 @@ class Transaction::Notification end end - # check if we have an dedcated display name for it + # check if we have a dedicated display name for it display = attribute_name if object_manager_attribute && object_manager_attribute[:display] diff --git a/app/models/transaction/slack.rb b/app/models/transaction/slack.rb index 2770d2199..19c984922 100644 --- a/app/models/transaction/slack.rb +++ b/app/models/transaction/slack.rb @@ -237,7 +237,7 @@ class Transaction::Slack changes[attribute_name] = value end - # if changed item is an _id field/reference, do an lookup for the realy values + # if changed item is an _id field/reference, look up the real values value_id = [] value_str = [ value[0], value[1] ] if key.to_s[-3, 3] == '_id' @@ -269,7 +269,7 @@ class Transaction::Slack end end - # check if we have an dedcated display name for it + # check if we have a dedicated display name for it display = attribute_name if object_manager_attribute && object_manager_attribute[:display] diff --git a/app/models/user.rb b/app/models/user.rb index fa3b8ef33..36481bcd1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -333,7 +333,7 @@ returns =begin -authenticate user agains sso +authenticate user again sso result = User.sso(sso_params) @@ -725,7 +725,7 @@ returns # to prevent any unexpected regressions.) User.find(user_id_of_duplicate_user) - # merge missing attibutes + # merge missing attributes Models.merge('User', id, user_id_of_duplicate_user) true @@ -759,7 +759,7 @@ returns =begin -update/sync default preferences of users in a dedecated permissions +update/sync default preferences of users with dedicated permissions result = User.update_default_preferences_by_permission('ticket.agent', force) @@ -796,7 +796,7 @@ returns =begin -update/sync default preferences of users in a dedecated role +update/sync default preferences of users in a dedicated role result = User.update_default_preferences_by_role('Agent', force) @@ -1254,7 +1254,7 @@ raise 'Minimum one user need to have admin permissions' # don't permit empty password update for existing users return password_was if password.blank? - # don't re-hash an already hashed passsword + # don't re-hash passwords return password if PasswordHash.crypted?(password) # hash the plaintext password diff --git a/app/models/user_device.rb b/app/models/user_device.rb index deca18d5b..5785385d7 100644 --- a/app/models/user_device.rb +++ b/app/models/user_device.rb @@ -161,7 +161,7 @@ log user device action user_device.ip = ip location_details = Service::GeoIp.location(ip) - # if we do not have any data from backend (e. g. geo ip ist out of service), ignore log + # if we do not have any data from backend (e.g. geo ip is out of service), ignore log if location_details && location_details['country_name'] user_device.location_details = location_details diff --git a/config/initializers/core_ext.rb b/config/initializers/core_ext.rb index e4c09d57e..d2e976842 100644 --- a/config/initializers/core_ext.rb +++ b/config/initializers/core_ext.rb @@ -1,4 +1,4 @@ -# load all core_ext extentions +# load all core_ext extensions Dir.glob( Rails.root.join('lib', 'core_ext', '**', '*') ).each do |file| if File.file?(file) require file diff --git a/lib/core_ext/active_record/connection_adapters/postgresql/schema_statements.rb b/lib/core_ext/active_record/connection_adapters/postgresql/schema_statements.rb index 245eda1aa..13009611b 100644 --- a/lib/core_ext/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/lib/core_ext/active_record/connection_adapters/postgresql/schema_statements.rb @@ -5,7 +5,7 @@ module ActiveRecord module PostgreSQL module SchemaStatements - # on postgres create lower indexes to support case insensetive wherer conditions + # on postgres create lower indices to support case-insensitive where conditions def add_index(table_name, column_name, options = {}) #:nodoc: index_name, index_type, index_columns, index_options, index_algorithm, index_using = add_index_options(table_name, column_name, options) diff --git a/lib/db_helper.rb b/lib/db_helper.rb index 27b61f699..29dc8f6f7 100644 --- a/lib/db_helper.rb +++ b/lib/db_helper.rb @@ -8,7 +8,7 @@ execute post database statements after import (e. g. reset primary key sequences DbHelper.import_post -or only for certan tables +or only for certain tables DbHelper.import_post(table_name) diff --git a/lib/enrichment/clearbit/organization.rb b/lib/enrichment/clearbit/organization.rb index 245d349f9..ce0596577 100644 --- a/lib/enrichment/clearbit/organization.rb +++ b/lib/enrichment/clearbit/organization.rb @@ -40,7 +40,7 @@ module Enrichment # Currently all target keys are prefixed with # organization. # which is not necessary since the target object - # is allways an organization + # is always an organization @mapping.transform_values! { |value| value.sub('organization.', '') } true end diff --git a/lib/enrichment/clearbit/user.rb b/lib/enrichment/clearbit/user.rb index 8f8e2c264..f9e1c0efd 100644 --- a/lib/enrichment/clearbit/user.rb +++ b/lib/enrichment/clearbit/user.rb @@ -46,7 +46,7 @@ module Enrichment # Currently all target keys are prefixed with # user. # which is not necessary since the target object - # is allways an user + # is always a user @mapping.transform_values! { |value| value.sub('user.', '') } true end diff --git a/lib/import/otrs/import_stats.rb b/lib/import/otrs/import_stats.rb index dccdf11ed..73d866299 100644 --- a/lib/import/otrs/import_stats.rb +++ b/lib/import/otrs/import_stats.rb @@ -26,7 +26,7 @@ module Import cache = Cache.get('import_otrs_stats') return cache if cache - # retrive statistic + # retrieve statistic statistic = Import::OTRS::Requester.list return statistic if !statistic diff --git a/lib/mixin/required_sub_paths.rb b/lib/mixin/required_sub_paths.rb index ef558b2ba..b59445b47 100644 --- a/lib/mixin/required_sub_paths.rb +++ b/lib/mixin/required_sub_paths.rb @@ -7,7 +7,7 @@ module Mixin eager_load_recursive(sub_path) end - # Loads a directory recursivly. + # Loads a directory recursively. # The specialty of this method is that it will first load all # files in a directory and then start with the sub directories. # This is needed since otherwise some parent namespaces might not diff --git a/lib/notification_factory/renderer.rb b/lib/notification_factory/renderer.rb index eaf23d9af..2127c2473 100644 --- a/lib/notification_factory/renderer.rb +++ b/lib/notification_factory/renderer.rb @@ -41,7 +41,7 @@ examples how to use # d('user.firstname', htmlEscape) def d(key, escape = nil) - # do validaton, ignore some methodes + # do validation, ignore some methods return "\#{#{key} / not allowed}" if !data_key_valid?(key) # aliases @@ -72,7 +72,7 @@ examples how to use object_refs = @objects[object_name] || @objects[object_name.to_sym] - # if object is not in avalable objects, just return + # if object is not in available objects, just return return "\#{#{object_name} / no such object}" if !object_refs # if content of method is a complex datatype, just return diff --git a/lib/stats/ticket_channel_distribution.rb b/lib/stats/ticket_channel_distribution.rb index f21e87bdb..4eafffce2 100644 --- a/lib/stats/ticket_channel_distribution.rb +++ b/lib/stats/ticket_channel_distribution.rb @@ -30,7 +30,7 @@ class Stats::TicketChannelDistribution }, ] - # calcualte + # calculate result = {} total_in = 0 total_out = 0 diff --git a/lib/stats/ticket_reopen.rb b/lib/stats/ticket_reopen.rb index d74df3cd0..6c1f9ac70 100644 --- a/lib/stats/ticket_reopen.rb +++ b/lib/stats/ticket_reopen.rb @@ -10,7 +10,7 @@ class Stats::TicketReopen user.id, Time.zone.now - 7.days ).count - # get count of repoens + # get count of reopens count = StatsStore.count_by_search( object: 'User', o_id: user.id, @@ -69,7 +69,7 @@ class Stats::TicketReopen ticket = Ticket.lookup(id: o_id) return if !ticket - # check if close_at is already set / if not, ticket is not reopend + # check if close_at is already set / if not, ticket is not reopened return if !ticket.close_at # only if state id has changed diff --git a/lib/websocket_server.rb b/lib/websocket_server.rb index 648881753..9d075cb86 100644 --- a/lib/websocket_server.rb +++ b/lib/websocket_server.rb @@ -31,7 +31,7 @@ class WebsocketServer WebsocketServer.check_unused_connections end - # check open unused connections, kick all connection without activitie in the last 2 minutes + # check open unused connections, kick all connection without activity in the last 2 minutes EventMachine.add_periodic_timer(120) do WebsocketServer.check_unused_connections end