Sha256: 2db32471a5255744d2b515c67b8c8dcd50b41b3acf187ca16e7cfc7d0ff65301

Contents?: true

Size: 885 Bytes

Versions: 11

Compression:

Stored size: 885 Bytes

Contents

module Plugins
  module Attack
    class AdminController < CamaleonCms::Apps::PluginsAdminController
      def settings
        @attack = current_site.get_meta('attack_config')
      end

      def save_settings
        current_site.set_meta('attack_config', { get: { sec: params[:attack][:get_sec], max: params[:attack][:get_max] },
                                                 post: { sec: params[:attack][:post_sec] || 20,
                                                         max: params[:attack][:post_max] },
                                                 msg: params[:attack][:msg],
                                                 ban: params[:attack][:ban],
                                                 cleared: Time.now })
        flash[:notice] = t('plugin.attack.messages.settings_saved').to_s
        redirect_to action: :settings
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
camaleon_cms-2.9.0 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.8.3 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.8.2 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.8.1 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.8.0 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.7.5 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.7.4 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.7.3 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.7.2 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.7.1 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.7.0 app/apps/plugins/attack/admin_controller.rb