aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-09-02 18:44:43 +0000
committerChad Little <clittle@users.sourceforge.net>2004-09-02 18:44:43 +0000
commit4d43120be01f4681e38e56df91e6f0ef8500e2ed (patch)
tree3dc315d9f432629506b14ccf9a07e6a358f85f23
parent88c00c20e642043675459659e7d3266fbc6fb1ec (diff)
downloadphpicalendar-4d43120be01f4681e38e56df91e6f0ef8500e2ed.tar.gz
phpicalendar-4d43120be01f4681e38e56df91e6f0ef8500e2ed.tar.bz2
phpicalendar-4d43120be01f4681e38e56df91e6f0ef8500e2ed.zip
Updated to $_SERVER
-rw-r--r--functions/init.inc.php8
-rw-r--r--preferences.php2
-rw-r--r--rss/index.php2
-rw-r--r--rss/rss.php2
-rw-r--r--search.php4
5 files changed, 9 insertions, 9 deletions
diff --git a/functions/init.inc.php b/functions/init.inc.php
index 30b5a83..8097ce6 100644
--- a/functions/init.inc.php
+++ b/functions/init.inc.php
@@ -4,8 +4,8 @@
error_reporting (E_ERROR | E_WARNING | E_PARSE);
// Older versions of PHP do not define $_SERVER. Define it here instead.
-if (!isset($_SERVER) && isset($HTTP_SERVER_VARS)) {
- $_SERVER = &$HTTP_SERVER_VARS;
+if (!isset($_SERVER) && isset($_SERVER)) {
+ $_SERVER = &$_SERVER;
}
// Define some magic strings.
@@ -29,7 +29,7 @@ if (isset($_COOKIE['phpicalendar'])) {
// Set the cookie URI.
if ($cookie_uri == '') {
- $cookie_uri = $HTTP_SERVER_VARS['SERVER_NAME'].substr($HTTP_SERVER_VARS['PHP_SELF'],0,strpos($HTTP_SERVER_VARS['PHP_SELF'], '/'));
+ $cookie_uri = $_SERVER['SERVER_NAME'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'], '/'));
}
if ($bleed_time == '') $bleed_time = $day_start;
@@ -131,7 +131,7 @@ if ($is_webcal == TRUE) {
// Sets the download and subscribe paths from the config if present.
if (isset($filename)) {
if (($download_uri == '') && (preg_match('/(^\/|\.\.\/)/', $filename) == 0)) {
- $subscribe_path = 'webcal://'.$HTTP_SERVER_VARS['SERVER_NAME'].dirname($HTTP_SERVER_VARS['PHP_SELF']).'/'.$filename;
+ $subscribe_path = 'webcal://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'.$filename;
$download_filename = $filename;
} elseif ($download_uri != '') {
$newurl = eregi_replace("^(http://)", "", $download_uri);
diff --git a/preferences.php b/preferences.php
index 41c0745..9d4685f 100644
--- a/preferences.php
+++ b/preferences.php
@@ -7,7 +7,7 @@ header("Content-Type: text/html; charset=$charset");
$display_date = $preferences_lang;
if ($cookie_uri == '') {
- $cookie_uri = $HTTP_SERVER_VARS['SERVER_NAME'].substr($HTTP_SERVER_VARS['PHP_SELF'],0,strpos($HTTP_SERVER_VARS['PHP_SELF'], '/'));
+ $cookie_uri = $_SERVER['SERVER_NAME'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'], '/'));
}
$current_view = "preferences";
diff --git a/rss/index.php b/rss/index.php
index b8649a1..fed55ea 100644
--- a/rss/index.php
+++ b/rss/index.php
@@ -4,7 +4,7 @@ define('BASE','../');
require_once(BASE.'functions/ical_parser.php');
require_once(BASE.'functions/calendar_functions.php');
-$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/'));
+$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";
diff --git a/rss/rss.php b/rss/rss.php
index bc22fca..42a0eac 100644
--- a/rss/rss.php
+++ b/rss/rss.php
@@ -7,7 +7,7 @@ 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/'));
+$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);
diff --git a/search.php b/search.php
index 885f482..c4fe439 100644
--- a/search.php
+++ b/search.php
@@ -8,8 +8,8 @@ require_once(BASE.'functions/list_functions.php');
require_once(BASE.'functions/template.php');
header("Content-Type: text/html; charset=$charset");
-if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER'] != '') {
- $back_page = $HTTP_SERVER_VARS['HTTP_REFERER'];
+if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != '') {
+ $back_page = $_SERVER['HTTP_REFERER'];
} else {
$back_page = BASE.$default_view.'.php?cal='.$cal.'&amp;getdate='.$getdate;
}

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