aboutsummaryrefslogtreecommitdiffstats
path: root/rss/index.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/index.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/index.php')
-rw-r--r--rss/index.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/rss/index.php b/rss/index.php
index fed55ea..4357020 100644
--- a/rss/index.php
+++ b/rss/index.php
@@ -4,7 +4,17 @@ define('BASE','../');
require_once(BASE.'functions/ical_parser.php');
require_once(BASE.'functions/calendar_functions.php');
-$default_path = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/'));
+if ($enable_rss != 'yes') {
+ 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/'));
+ }
+}
$current_view = "rssindex";
$display_date = "RSS Info";
@@ -44,6 +54,7 @@ $page->replace_tags(array(
'sidebar_date' => $sidebar_date,
'rss_powered' => $rss_powered,
'rss_list' => $rss_list,
+ 'charset' => $charset,
'rss_available' => '',
'rssdisable' => '',
'rss_valid' => '',

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