diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-10-25 17:16:07 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-10-25 17:16:07 +0000 |
commit | f1a377b8f764275248ef91fa84a79576efe84136 (patch) | |
tree | 7a910efa078f61c3d84b5aadcb262da633b6e77f /rss/rss.php | |
parent | 3d5388d9730504775b56c7ef9e9776b48c1b1689 (diff) | |
download | phpicalendar-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.php | 11 |
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); |