<commit_before># Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
  require_dependency File.join(Rails.root, 'vendor', 'plugins', 'annotations', 'lib', 'app', 'controllers', 'application_controller')

  skip_after_filter :add_piwik_analytics_tracking if Seek::Config.piwik_analytics_enabled == false

  self.mod_porter_secret = PORTER_SECRET

  include ExceptionNotifiable
  self.error_layout="errors"
  self.silent_exceptions = []
  self.rails_error_classes = {
  ActiveRecord::RecordNotFound => "404",
  ::ActionController::UnknownController => "406",
  ::ActionController::UnknownAction => "406",
  ::ActionController::RoutingError => "404",  
  ::ActionView::MissingTemplate => "406",
  ::ActionView::TemplateError => "500"
  }
  local_addresses.clear

  exception_data :additional_exception_notifier_data

  after_filter :log_event

  include AuthenticatedSystem
  around_filter :with_current_user
  def with_current_user
    User.with_current_user current_user do
      yield
    end
  end

  before_filter :profile_for_login_required
  before_filter :project_membership_required,:only=>[:create,:new]

  helper :all

  layout "main"

  # See ActionController::RequestForgeryProtection for details<commit_msg>change the error messages for ActionCotroller::UnknownAction, ActionController::UnknownController to 404 to stop sending email<commit_after># Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
  require_dependency File.join(Rails.root, 'vendor', 'plugins', 'annotations', 'lib', 'app', 'controllers', 'application_controller')

  skip_after_filter :add_piwik_analytics_tracking if Seek::Config.piwik_analytics_enabled == false

  self.mod_porter_secret = PORTER_SECRET

  include ExceptionNotifiable
  self.error_layout="errors"
  self.silent_exceptions = []
  self.rails_error_classes = {
  ActiveRecord::RecordNotFound => "404",
  ::ActionController::UnknownController => "404",
  ::ActionController::UnknownAction => "404",
  ::ActionController::RoutingError => "404",  
  ::ActionView::MissingTemplate => "404",
  ::ActionView::TemplateError => "500"
  }
  local_addresses.clear

  exception_data :additional_exception_notifier_data

  after_filter :log_event

  include AuthenticatedSystem
  around_filter :with_current_user
  def with_current_user
    User.with_current_user current_user do
      yield
    end
  end

  before_filter :profile_for_login_required
  before_filter :project_membership_required,:only=>[:create,:new]

  helper :all

  layout "main"

  # See ActionController::RequestForgeryProtection for details
{'fraction_non_alphanumeric': 0.09218366631615843, 'fraction_numerical': 0.013669821240799159, 'mean_word_length': 6.152882205513785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6332582', 'n_tokens_mistral': 855, 'n_tokens_neox': 797, 'n_words': 189}