]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/edit.html.erb
Include the user description in the spam score
[rails.git] / app / views / site / edit.html.erb
index 51389afc16181b34c6348146cfb8bbefe6da57ca..779abd352b659324992a20c4efd53fc924180066 100644 (file)
@@ -12,7 +12,7 @@
 <% else %>
 <% content_for :greeting do %>
 <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
-<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
+<%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)", { :title => t('layouts.home_tooltip') } %> |
 <% end %>
 <% end %>
 
@@ -20,7 +20,7 @@
 <%= render :partial => 'search' %>
 
 <%
-session[:token] = @user.tokens.create.token unless session[:token]
+session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token])
 
 # Decide on a lat lon to initialise potlatch with. Various ways of doing this
 if params['lon'] and params['lat']
@@ -88,7 +88,7 @@ zoom='14' if zoom.nil?
   doSWF(<%= lat || 'null' %>,<%= lon || 'null' %>,<%= zoom %>);
 
   function setPosition(lat, lon, zoom) {
-    doSWF(lat, lon, zoom);
+    doSWF(lat, lon, zoom || 15);
   }
 
   function resizeContent() {