diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2011-04-18 08:52:02 +0200 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2011-04-18 08:52:02 +0200 |
commit | 451383433d842f4a6734573a37aaf9098dd245c7 (patch) | |
tree | 5c0f3fab84181c700cdebffe8b6251ec030bf033 /example.cgi | |
parent | e8a6206719edc70b0ce7257da5b34471f7f8e71f (diff) |
complete change of configuration
Diffstat (limited to 'example.cgi')
-rwxr-xr-x | example.cgi | 10 |
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 |