]> git.openstreetmap.org Git - rails.git/blobdiff - script/gravatar
Add padding between the last diary post and the pagination links
[rails.git] / script / gravatar
index e14e7ea0e26afd4468727cb0d5f4640a1c04b753..b86b793665d202cf3b511e71370c8170fca612d6 100755 (executable)
@@ -4,7 +4,7 @@
 
 start = 0
 User.where("image_use_gravatar AND id >=" + start.to_s).order("id").find_each do |user|
-  p "checked up to id " + user.id.to_s if user.id % 1000 == 0 # just give a rough indication where we are for restarting
+  p "checked up to id " + user.id.to_s if (user.id % 1000).zero? # just give a rough indication where we are for restarting
   next if user.image.present?
   hash = Digest::MD5.hexdigest(user.email.downcase)
   url = "https://www.gravatar.com/avatar/#{hash}?d=404" # without d=404 we will always get an image back