From f1a377b8f764275248ef91fa84a79576efe84136 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 25 Oct 2004 17:16:07 +0000 Subject: More error messages. Fixed default paths everywhere. --- rss/rss.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'rss/rss.php') 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); -- cgit v1.2.3