This commit is contained in:
albert
2013-03-23 12:12:54 -04:00
parent 2378e91006
commit faada9f87b
3 changed files with 3 additions and 2 deletions

View File

@@ -433,7 +433,7 @@ class User < ActiveRecord::Base
end
def upload_limit
deleted_count = Post.for_user(id).deleted.count
deleted_count = Post.for_user(id).deleted.where("is_banned = false").count
pending_count = Post.for_user(id).pending.count
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", id).count

View File

@@ -38,7 +38,7 @@ class UserPresenter
return "none"
end
deleted_count = Post.for_user(user.id).deleted.count
deleted_count = Post.for_user(user.id).deleted.where("is_banned = false").count
pending_count = Post.for_user(user.id).pending.count
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", user.id).count

View File

@@ -1,5 +1,6 @@
class AddHideDeletedPostsToUsers < ActiveRecord::Migration
def change
execute "set statement_timeout = 0"
add_column :users, :hide_deleted_posts, :boolean, :null => false, :default => false
end
end