]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/amf_controller.rb
Fixed bug #1816 - the timeout updating logic should have been in a before_save handle...
[rails.git] / app / controllers / amf_controller.rb
index b6d8cbe539fee8325f91cc2863691381953569f0..0f61b7a4774e7874443d9998bd18edc518ec01a3 100644 (file)
@@ -815,12 +815,10 @@ class AmfController < ApplicationController
     return user
   end
 
     return user
   end
 
-  # Update changeset timeout
-  # i.e. one hour after current edit
-  
-  def updatetimeout(changeset_id) #:doc:
+  # save the changeset identified by +changeset_id+. this 
+  # automatically sets the close timeout appropriately.
+  def updatetimeout(changeset_id) 
     cs = Changeset.find(changeset_id)
     cs = Changeset.find(changeset_id)
-    cs.closed_at = Time.now.getutc + Changeset::IDLE_TIMEOUT
     cs.save!
   end
 
     cs.save!
   end