aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-07-15 16:25:09 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-07-15 16:25:09 +0200
commit027b948150e9c709fc721a0a2951b0d10a6eebb8 (patch)
tree1eb38ad03c1f5b96bd5f9327126a37093afe82a8
parent0454e991760f7e7bf0d5fe552cc6f045fbaa5ed2 (diff)
atom wird nur angeboten, wenn atom.cgi existiert
-rw-r--r--README2
-rwxr-xr-xindex.cgi7
-rwxr-xr-xparticipate.rb6
3 files changed, 10 insertions, 5 deletions
diff --git a/README b/README
index e0dc61c..4fcfea5 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
Author:
Benjamin Kellermann <Benjamin dot Kellermann at tu-dresden in germany>
Requirements:
- * ruby, ruby-atom
+ * ruby
* bzr
License:
CC-by-sa 3.0
diff --git a/index.cgi b/index.cgi
index a4857e5..d4119c4 100755
--- a/index.cgi
+++ b/index.cgi
@@ -35,10 +35,11 @@ $htmlout += <<HEAD
<title>dudle</title>
<meta http-equiv="Content-Type" content="#{TYPE}; charset=#{CHARSET}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
- <link rel="alternate" type="application/atom+xml" href="atom.cgi" />
-</head>
-<body>
HEAD
+
+ $htmlout += '<link rel="alternate" type="application/atom+xml" href="atom.cgi" />' if File.exists?("atom.cgi")
+
+ $htmlout += "</head><body>"
if $cgi.include?("create_poll")
SITE=$cgi["create_poll"]
diff --git a/participate.rb b/participate.rb
index e9f5e82..8acd9f1 100755
--- a/participate.rb
+++ b/participate.rb
@@ -62,7 +62,11 @@ $htmlout += <<HEAD
<link rel="stylesheet" type="text/css" href="../dudle.css" title="default"/>
<link rel="stylesheet" type="text/css" href="../print.css" title="print" media="print" />
<link rel="stylesheet" type="text/css" href="../print.css" title="print" />
- <link rel="alternate" type="application/atom+xml" href="atom.cgi" />
+HEAD
+
+$htmlout += '<link rel="alternate" type="application/atom+xml" href="atom.cgi" />' if File.exists?("../atom_single.rb")
+
+$htmlout += <<HEAD
</head>
<body>
<div>