aboutsummaryrefslogtreecommitdiff
path: root/example.cgi
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-04-18 08:52:02 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-04-18 08:52:02 +0200
commit451383433d842f4a6734573a37aaf9098dd245c7 (patch)
tree5c0f3fab84181c700cdebffe8b6251ec030bf033 /example.cgi
parente8a6206719edc70b0ce7257da5b34471f7f8e71f (diff)
complete change of configuration
Diffstat (limited to 'example.cgi')
-rwxr-xr-xexample.cgi10
1 files changed, 5 insertions, 5 deletions
diff --git a/example.cgi b/example.cgi
index d2bf9cd..2122bb7 100755
--- a/example.cgi
+++ b/example.cgi
@@ -28,7 +28,7 @@ $d = Dudle.new
if $cgi.include?("poll")
poll = nil
- EXAMPLES.each{|p|
+ $conf.examples.each{|p|
poll = p if $cgi["poll"] == p[:url]
}
@@ -53,20 +53,20 @@ if $cgi.include?("poll")
$d.html.header["status"] = "REDIRECT"
$d.html.header["Cache-Control"] = "no-cache"
- $d.html.header["Location"] = SITEURL + targeturl
+ $d.html.header["Location"] = $conf.siteurl + targeturl
else
- if defined?(EXAMPLES)
+ unless $conf.examples.empty?
$d << "<div class='textcolumn'><h2>" + _("Examples") + "</h2>"
$d << _("If you want to play with the application, you may want to take a look at these example polls:")
$d << "<ul>"
- EXAMPLES.each{|poll|
+ $conf.examples.each{|poll|
$d << "<li><a href='example.cgi?poll=#{poll[:url]}'>#{poll[:description]}</a></li>" unless poll[:hidden]
}
$d << "</ul></div>"
end
- $d << EXAMPLENOTICE
+ $d << $conf.examplenotice
end