diff --git a/app/controllers/uploads_controller.rb b/app/controllers/uploads_controller.rb index c9cff26fd..04c90f502 100644 --- a/app/controllers/uploads_controller.rb +++ b/app/controllers/uploads_controller.rb @@ -35,7 +35,7 @@ class UploadsController < ApplicationController def create @upload = Upload.create(params[:upload].merge(:server => Socket.gethostname)) - @upload.process! if @upload.errors.empty? + @upload.process! if @upload.errors.empty? respond_with(@upload) end diff --git a/app/models/user.rb b/app/models/user.rb index bcf1a8d19..cf9fc4e32 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -29,7 +29,6 @@ class User < ActiveRecord::Base validates_presence_of :email, :if => lambda {|rec| rec.new_record? && Danbooru.config.enable_email_verification?} validates_presence_of :comment_threshold validate :validate_ip_addr_is_not_banned, :on => :create - validate :validate_feedback_on_name_change, :on => :update before_validation :normalize_blacklisted_tags before_create :encrypt_password_on_create before_update :encrypt_password_on_update @@ -111,13 +110,6 @@ class User < ActiveRecord::Base rescue Exception # swallow, since it'll be expired eventually anyway end - - def validate_feedback_on_name_change - if feedback.negative.count > 0 && name_changed? - self.errors[:base] << "You can not change your name if you have any negative feedback" - return false - end - end end module PasswordMethods @@ -407,10 +399,8 @@ class User < ActiveRecord::Base def upload_limited_reason if created_at > 1.week.ago "cannot upload during your first week of registration" - elsif upload_limit <= 0 - "can only upload #{upload_limit} posts a day" else - nil + "can not upload until your pending posts have been approved" end end