aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindex.cgi2
-rwxr-xr-xremove_poll.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/index.cgi b/index.cgi
index f5c2744..ccb6f7e 100755
--- a/index.cgi
+++ b/index.cgi
@@ -105,7 +105,7 @@ $htmlout += <<CREATE
<table>
<tr>
<td><label title="#{poll_name_tip = "the name equals the link under which you receive the poll"}" for="poll_name">Name:</label></td>
- <td><input title="#{poll_name_tip}" id="poll_name" size='16' type='text' name='create_poll' value='#{$cgi["create_poll"]}' /></td>
+ <td><input title="#{poll_name_tip}" id="poll_name" size='16' type='text' name='create_poll' /></td>
</tr>
<tr>
<td><label for="poll_type">Type:</label></td>
diff --git a/remove_poll.rb b/remove_poll.rb
index ea0b6ee..3938c69 100755
--- a/remove_poll.rb
+++ b/remove_poll.rb
@@ -14,6 +14,7 @@ QUESTIONS = ["Yes, I know what I am doing!",
CONFIRM = rand(QUESTIONS.size)
require "cgi"
+require "ftools"
if __FILE__ == $0
@@ -41,7 +42,7 @@ HEAD
if $cgi.include?("confirmnumber")
if $cgi["confirm"] == QUESTIONS[$cgi["confirmnumber"].to_i]
Dir.chdir("..")
- `mv #{POLL} /tmp/#{POLL}.#{rand(9999999)}`
+ File.move(POLL, "/tmp/#{POLL}.#{rand(9999999)}")
$htmlout += <<SUCCESS
<div>
The poll was deleted successfully!