Use configuration variables for limiting nearby users, and bump the number to 30

This commit is contained in:
Andy Allan 2010-12-17 13:18:26 +00:00
parent b5e28f092f
commit 6d51e77880
2 changed files with 5 additions and 1 deletions

View file

@ -107,7 +107,7 @@ class User < ActiveRecord::Base
(languages & array.collect { |i| i.to_s }).first
end
def nearby(radius = 50, num = 10)
def nearby(radius = NEARBY_RADIUS, num = NEARBY_USERS)
if self.home_lon and self.home_lat
gc = OSM::GreatCircle.new(self.home_lat, self.home_lon)
bounds = gc.bounds(radius)

View file

@ -41,6 +41,10 @@ standard_settings: &standard_settings
# Quova authentication details
#quova_username: ""
#quova_password: ""
# Users to show as being nearby
nearby_users: 30
# Max radius, in km, for nearby users
nearby_radius: 50
# Spam threshold
spam_threshold: 50
# Default legale (jurisdiction location) for contributor terms