diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2008-12-20 22:52:44 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2008-12-20 22:52:44 +0100 |
commit | 75fdd2ee19fc69acd7c037fab4e99a56d4ce99c8 (patch) | |
tree | c996ff4b6e5f42f35e8af173a25daac87f39039f | |
parent | a502496f25430ddc3e665b0291ca6bcf056feb4d (diff) |
exchanged empty participant with anonymous
-rw-r--r-- | poll.rb | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -173,11 +173,14 @@ END end def add_participant(name, agreed) htmlname = CGI.escapeHTML(name.strip) - @data[htmlname] = {"timestamp" => Time.now } - @head.each_key{|columntitle| - @data[htmlname][columntitle] = agreed[columntitle.to_s] - } - store "Participant #{name.strip} edited" + if htmlname == "" + htmlname = "Anonymous ##{rand(1000)}" + end + @data[htmlname] = {"timestamp" => Time.now } + @head.each_key{|columntitle| + @data[htmlname][columntitle] = agreed[columntitle.to_s] + } + store "Participant #{name.strip} edited" end def invite_delete(name) htmlname = CGI.escapeHTML(name.strip) |