aboutsummaryrefslogtreecommitdiff
path: root/history.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-23 15:58:49 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-23 15:58:49 +0100
commit19409f822c901b4935b07493d741d479fbc119a0 (patch)
treec971ca940ebf21d0fe103a1be9276e88f85396f3 /history.rb
parentfc936f76f65db94469959883c8ef2926ff0e779b (diff)
started to implement undo, added flatten option
Diffstat (limited to '')
-rwxr-xr-xhistory.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/history.rb b/history.rb
index 43c5264..46ab5ec 100755
--- a/history.rb
+++ b/history.rb
@@ -33,13 +33,12 @@ require "poll"
load "config.rb"
Dir.chdir(olddir)
-maxrev = VCS.revno
if $cgi.include?("revision")
revno=$cgi["revision"].to_i
versiontitle = "Poll of Version #{revno}"
table = YAML::load(VCS.cat(revno, "data.yaml"))
else
- revno = maxrev
+ revno = VCS.revno
versiontitle = "Current Poll"
table = YAML::load_file("data.yaml")
end
@@ -65,8 +64,8 @@ $html << table.to_html("",false)
$html << "<h2>History</h2>"
$html << "<div id='history'>"
historyselect = $cgi.include?("history") ? $cgi["history"] : nil
-$html << table.history_selectform(revno == maxrev ? nil : revno, historyselect)
-$html << table.history_to_html(maxrev, revno, historyselect)
+$html << table.history_selectform($cgi.include?("revision") ? nil : revno, historyselect)
+$html << table.history_to_html(revno, historyselect)
$html << "</div>"
$html << "</div></body>"