aboutsummaryrefslogtreecommitdiffstats
path: root/rss/rss.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-10-25 17:16:07 +0000
committerChad Little <clittle@users.sourceforge.net>2004-10-25 17:16:07 +0000
commitf1a377b8f764275248ef91fa84a79576efe84136 (patch)
tree7a910efa078f61c3d84b5aadcb262da633b6e77f /rss/rss.php
parent3d5388d9730504775b56c7ef9e9776b48c1b1689 (diff)
downloadphpicalendar-f1a377b8f764275248ef91fa84a79576efe84136.tar.gz
phpicalendar-f1a377b8f764275248ef91fa84a79576efe84136.tar.bz2
phpicalendar-f1a377b8f764275248ef91fa84a79576efe84136.zip
More error messages. Fixed default paths everywhere.
Diffstat (limited to 'rss/rss.php')
-rw-r--r--rss/rss.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/rss/rss.php b/rss/rss.php
index c604afa..e15c63c 100644
--- a/rss/rss.php
+++ b/rss/rss.php
@@ -4,10 +4,17 @@ define('BASE', '../');
include(BASE.'functions/ical_parser.php');
if ($enable_rss != 'yes') {
- die ("RSS feeds are not enabled on this site.");
+ exit(error('RSS is not available for this installation.', $cal, '../'));
+}
+
+if (empty($default_path)) {
+ if (isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on' ) {
+ $default_path = 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/'));
+ } else {
+ $default_path = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/'));
+ }
}
-$default_path = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/'));
$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day));
$end_week_time = $start_week_time + (6 * 25 * 60 * 60);
$start_week = localizeDate($dateFormat_week, $start_week_time);

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