aboutsummaryrefslogtreecommitdiffstats
path: root/rss
diff options
context:
space:
mode:
authorfenner <fenner>2002-11-27 20:34:24 +0000
committerfenner <fenner>2002-11-27 20:34:24 +0000
commit13bd1058b1ed5e9f38ccc594e92c2cf27cb46e1a (patch)
tree15226ec1e3b2351eff349ab77ad498a7f148b6fc /rss
parent54f310e8e067fca869b66e9faf9121125ce773bd (diff)
downloadphpicalendar-13bd1058b1ed5e9f38ccc594e92c2cf27cb46e1a.tar.gz
phpicalendar-13bd1058b1ed5e9f38ccc594e92c2cf27cb46e1a.tar.bz2
phpicalendar-13bd1058b1ed5e9f38ccc594e92c2cf27cb46e1a.zip
Don't supply any RSS info (index or the feed itself) unless
$enable_rss is "yes".
Diffstat (limited to 'rss')
-rw-r--r--rss/index.php6
-rw-r--r--rss/rss.php5
2 files changed, 11 insertions, 0 deletions
diff --git a/rss/index.php b/rss/index.php
index a62889d..3c0d6ac 100644
--- a/rss/index.php
+++ b/rss/index.php
@@ -55,6 +55,7 @@ if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER'
<tr>
<td class="dayborder"><img src="images/spacer.gif" width="1" height="5"></td>
</tr>
+ <?php if ($enable_rss == "yes") { ?>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="G10B">
@@ -95,6 +96,11 @@ if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER'
</table>
</td>
</tr>
+ <?php } else { ?>
+ <tr>
+ <td align="center" class="navback" nowrap valign="middle"><font class="H20">RSS is not enabled on this site.</font></td>
+ </tr>
+ <?php } ?>
</table>
</td>
</tr>
diff --git a/rss/rss.php b/rss/rss.php
index bc289cf..7459155 100644
--- a/rss/rss.php
+++ b/rss/rss.php
@@ -2,6 +2,11 @@
define('BASE', '../');
include(BASE.'functions/ical_parser.php');
+
+if ($enable_rss != 'yes') {
+ die ("RSS feeds are not enabled on this site.");
+}
+
$default_path = 'http://'.$HTTP_SERVER_VARS['SERVER_NAME'].':'.$HTTP_SERVER_VARS['SERVER_PORT'].substr($HTTP_SERVER_VARS['PHP_SELF'],0,strpos($HTTP_SERVER_VARS['PHP_SELF'],'/rss/'));
$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day));
$end_week_time = $start_week_time + (6 * 25 * 60 * 60);

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