aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpberry <pberry>2002-11-27 20:13:57 +0000
committerpberry <pberry>2002-11-27 20:13:57 +0000
commit54f310e8e067fca869b66e9faf9121125ce773bd (patch)
treea5bb17bcecfe2fefd61b468a260933a1a0a17f24
parent06a3d37766f991bac0e9f9a2e882ede2b9ca8c74 (diff)
downloadphpicalendar-54f310e8e067fca869b66e9faf9121125ce773bd.tar.gz
phpicalendar-54f310e8e067fca869b66e9faf9121125ce773bd.tar.bz2
phpicalendar-54f310e8e067fca869b66e9faf9121125ce773bd.zip
RSS auto-discovery link now honors $enable_rss. In other words, if we
don't do RSS, don't both printing the link tag
-rw-r--r--day.php8
-rw-r--r--month.php8
-rw-r--r--week.php8
3 files changed, 21 insertions, 3 deletions
diff --git a/day.php b/day.php
index dacf4b9..ec7839d 100644
--- a/day.php
+++ b/day.php
@@ -51,7 +51,13 @@ if (is_array($master_array[($getdate)])) {
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title><?php echo "$calendar_name - $display_date"; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>">
- <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $default_path.'/rss/rss.php?cal='.$cal.'&rssview=day'; ?>">
+ <?php
+ // if RSS is enabled, set the RSS auto-discovery link
+ if ($enable_rss == 'yes')
+ {
+ echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=day\">";
+ }
+ ?>
<?php include (BASE.'functions/event.js'); ?>
<?php if (is_array($master_array['-2'])) include (BASE.'functions/todo.js'); ?>
</head>
diff --git a/month.php b/month.php
index f3f0561..2d48693 100644
--- a/month.php
+++ b/month.php
@@ -50,7 +50,13 @@ $num_of_events = 0;
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title><?php echo "$calendar_name - $display_month"; ?></title>
<link rel="stylesheet" type="text/css" href="styles/<?php echo "$style_sheet/default.css"; ?>">
- <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $default_path.'/rss/rss.php?cal='.$cal.'&rssview=month'; ?>">
+ <?php
+ // if RSS is enabled, set the RSS auto-discovery link
+ if ($enable_rss == 'yes')
+ {
+ echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=month\">";
+ }
+ ?>
<?php include (BASE.'functions/event.js'); ?>
</head>
<body>
diff --git a/week.php b/week.php
index 9838c4a..dec4c81 100644
--- a/week.php
+++ b/week.php
@@ -51,7 +51,13 @@ for ($i=0;$i<7;$i++) {
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title><?php echo "$calendar_name - $display_date"; ?></title>
<link rel="stylesheet" type="text/css" href="styles/<?php echo "$style_sheet/default.css"; ?>">
- <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $default_path.'/rss/rss.php?cal='.$cal.'&rssview=week'; ?>">
+ <?php
+ // if RSS is enabled, set the RSS auto-discovery link
+ if ($enable_rss == 'yes')
+ {
+ echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=week\">";
+ }
+ ?>
<?php include (BASE.'functions/event.js'); ?>
<?php if (is_array($master_array['-2'])) include (BASE.'functions/todo.js'); ?>
</head>

© 2014-2024 Faster IT GmbH | imprint | privacy policy