tipping: only show tipping sites with paypal/btc input

This commit is contained in:
Kyle Drake 2017-02-25 10:19:14 -08:00
parent 42b3f25b11
commit 3dc38bfc5a
3 changed files with 6 additions and 1 deletions

View file

@ -1356,6 +1356,10 @@ class Site < Sequel::Model
!site_files_dataset.where(path: /^\/?index.html$/).where(sha1_hash: EMPTY_FILE_HASH).first.nil?
end
def tipping_enabled?
tipping_enabled && (!tipping_paypal.blank? || !tipping_bitcoin.blank?)
end
def classify(path)
return nil unless classification_allowed? path
#$classifier.classify process_for_classification(path)