From 8bf842ae99d7b04520dc5102e1bfa4ee6228bcaf Mon Sep 17 00:00:00 2001 From: albert Date: Sat, 23 Feb 2013 18:17:42 -0500 Subject: [PATCH] use sendmail mailer in production --- app/assets/stylesheets/specific/maintenance.css.scss | 5 +++++ app/models/user.rb | 2 +- app/presenters/user_presenter.rb | 2 +- config/environments/production.rb | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 app/assets/stylesheets/specific/maintenance.css.scss diff --git a/app/assets/stylesheets/specific/maintenance.css.scss b/app/assets/stylesheets/specific/maintenance.css.scss new file mode 100644 index 000000000..196cbe2c7 --- /dev/null +++ b/app/assets/stylesheets/specific/maintenance.css.scss @@ -0,0 +1,5 @@ +div#c-maintenance-user-login-reminders { + div#a-new { + width: 50em; + } +} \ No newline at end of file diff --git a/app/models/user.rb b/app/models/user.rb index 9cdffdb60..96cc500a7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -396,7 +396,7 @@ class User < ActiveRecord::Base def upload_limit deleted_count = Post.for_user(id).deleted.count pending_count = Post.for_user(id).pending.count - approved_count = Post.where("is_pending = false and is_deleted = false and uploader_id = ?", id).count + approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", id).count if base_upload_limit limit = base_upload_limit - pending_count diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index c8e69007d..f5b388d4c 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -48,7 +48,7 @@ class UserPresenter deleted_count = Post.for_user(user.id).deleted.count pending_count = Post.for_user(user.id).pending.count - approved_count = Post.where("is_pending = false and is_deleted = false and uploader_id = ?", user.id).count + approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", user.id).count if user.base_upload_limit limit = user.base_upload_limit - pending_count diff --git a/config/environments/production.rb b/config/environments/production.rb index 7948739ab..9f7bd0668 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -64,4 +64,6 @@ Danbooru::Application.configure do # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) # config.active_record.auto_explain_threshold_in_seconds = 0.5 + + config.action_mailer.delivery_method = :sendmail end