fixes
This commit is contained in:
@@ -433,7 +433,7 @@ class User < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def upload_limit
|
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
|
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
|
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", id).count
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class UserPresenter
|
|||||||
return "none"
|
return "none"
|
||||||
end
|
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
|
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
|
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", user.id).count
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
class AddHideDeletedPostsToUsers < ActiveRecord::Migration
|
class AddHideDeletedPostsToUsers < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
|
execute "set statement_timeout = 0"
|
||||||
add_column :users, :hide_deleted_posts, :boolean, :null => false, :default => false
|
add_column :users, :hide_deleted_posts, :boolean, :null => false, :default => false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user