+ # Start new changeset
+
+ def startchangeset(usertoken, cstags, closeid, closecomment)
+ uid = getuserid(usertoken)
+ if !uid then return -1,"You are not logged in, so Potlatch can't write any changes to the database." end
+
+ # close previous changeset and add comment
+ if closeid
+ end
+
+ # open a new changeset
+ cs = Changeset.new
+ cs.tags = cstags
+ cs.user_id = uid
+ cs.created_at = Time.now
+ cs.save_with_tags!
+ return [0,cs.id]
+ end
+