Sha256: b1c2640ffff7d3c9ab8096615eab0c82b236f6db4064a9a0da71f78c6336111b

Contents?: true

Size: 778 Bytes

Versions: 71

Compression:

Stored size: 778 Bytes

Contents

class Plugins::Attack::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')}"
    redirect_to action: :settings
  end

end

Version data entries

71 entries across 71 versions & 2 rubygems

Version Path
camaleon_cms-2.6.4 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.6.3 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.6.2 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.6.1 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.6.0.1 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.6.0 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.5.3.1 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.5.3 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.5.2 app/apps/plugins/attack/admin_controller.rb
camaleon_cms_rails6-2.5.0 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.5.1 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.5.0 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.9 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.8 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.7 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.6 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.5 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.4 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.3 app/apps/plugins/attack/admin_controller.rb
camaleon_cms-2.4.6.2 app/apps/plugins/attack/admin_controller.rb