aboutsummaryrefslogtreecommitdiffstats
path: root/functions
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 /functions
parent88c00c20e642043675459659e7d3266fbc6fb1ec (diff)
downloadphpicalendar-4d43120be01f4681e38e56df91e6f0ef8500e2ed.tar.gz
phpicalendar-4d43120be01f4681e38e56df91e6f0ef8500e2ed.tar.bz2
phpicalendar-4d43120be01f4681e38e56df91e6f0ef8500e2ed.zip
Updated to $_SERVER
Diffstat (limited to 'functions')
-rw-r--r--functions/init.inc.php8
1 files changed, 4 insertions, 4 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);

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