From f627180c1eb32250e9656c94ba8740610a99d19a Mon Sep 17 00:00:00 2001 From: kink Date: Sun, 18 Feb 2007 12:46:47 +0000 Subject: [PATCH] HTTP_SERVER_SERVER should be HTTP_SERVER_VARS, but since we require PHP >= 4.1.x, we need not use it anyware. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12271 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- include/load_prefs.php | 3 +-- plugins/bug_report/functions.php | 3 +-- plugins/bug_report/system_specs.php | 3 +-- plugins/change_password/backend/ldap.php | 3 +-- plugins/filters/filters.php | 3 +-- plugins/translate/functions.php | 3 +-- themes/greenhouse_effect.php | 3 +-- themes/in_the_pink.php | 3 +-- themes/kind_of_blue.php | 3 +-- themes/monostochastic.php | 3 +-- themes/random.php | 3 +-- themes/shades_of_grey.php | 3 +-- themes/spice_of_life.php | 3 +-- themes/spice_of_life_dark.php | 3 +-- themes/spice_of_life_lite.php | 3 +-- 15 files changed, 15 insertions(+), 30 deletions(-) diff --git a/include/load_prefs.php b/include/load_prefs.php index 12886b9f..cc73748b 100644 --- a/include/load_prefs.php +++ b/include/load_prefs.php @@ -17,8 +17,7 @@ * FIXME: PHP CGI (at least on IIS 5.1) does not set 'SCRIPT_FILENAME' and * code does not handle magic_quotes_gpc=on. */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { header("Location: ../src/login.php"); die(); } diff --git a/plugins/bug_report/functions.php b/plugins/bug_report/functions.php index e078dfb9..ba2c2f35 100644 --- a/plugins/bug_report/functions.php +++ b/plugins/bug_report/functions.php @@ -13,8 +13,7 @@ /** * do not allow to call this file directly */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { header("Location: ../../src/login.php"); die(); } diff --git a/plugins/bug_report/system_specs.php b/plugins/bug_report/system_specs.php index d3fbe135..7a209995 100644 --- a/plugins/bug_report/system_specs.php +++ b/plugins/bug_report/system_specs.php @@ -13,8 +13,7 @@ /** * do not allow to call this file directly */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { header("Location: ../../src/login.php"); die(); } diff --git a/plugins/change_password/backend/ldap.php b/plugins/change_password/backend/ldap.php index d7342d26..93a4b090 100644 --- a/plugins/change_password/backend/ldap.php +++ b/plugins/change_password/backend/ldap.php @@ -13,8 +13,7 @@ /** * do not allow to call this file directly */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { header("Location: ../../../src/login.php"); die(); } diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index 995adf2e..10b703d2 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -13,8 +13,7 @@ /** * do not allow to call this file directly */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { header("Location: ../../src/login.php"); die(); } diff --git a/plugins/translate/functions.php b/plugins/translate/functions.php index 6df6fb01..cef56833 100644 --- a/plugins/translate/functions.php +++ b/plugins/translate/functions.php @@ -13,8 +13,7 @@ /** * do not allow to call this file directly */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { header("Location: ../../src/login.php"); die(); } diff --git a/themes/greenhouse_effect.php b/themes/greenhouse_effect.php index c006b0ae..a3f9b931 100755 --- a/themes/greenhouse_effect.php +++ b/themes/greenhouse_effect.php @@ -15,8 +15,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/in_the_pink.php b/themes/in_the_pink.php index 6a3ea45d..8d91e4e1 100755 --- a/themes/in_the_pink.php +++ b/themes/in_the_pink.php @@ -16,8 +16,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/kind_of_blue.php b/themes/kind_of_blue.php index b83b67d9..12552f2e 100755 --- a/themes/kind_of_blue.php +++ b/themes/kind_of_blue.php @@ -16,8 +16,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/monostochastic.php b/themes/monostochastic.php index e38b51e0..952ea41c 100755 --- a/themes/monostochastic.php +++ b/themes/monostochastic.php @@ -16,8 +16,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/random.php b/themes/random.php index 447a95bc..2064b78d 100755 --- a/themes/random.php +++ b/themes/random.php @@ -14,8 +14,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/shades_of_grey.php b/themes/shades_of_grey.php index 98e1dbfc..50592acb 100755 --- a/themes/shades_of_grey.php +++ b/themes/shades_of_grey.php @@ -15,8 +15,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/spice_of_life.php b/themes/spice_of_life.php index 192b8367..3be8549e 100755 --- a/themes/spice_of_life.php +++ b/themes/spice_of_life.php @@ -15,8 +15,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/spice_of_life_dark.php b/themes/spice_of_life_dark.php index 7e386f12..dc14f2cd 100755 --- a/themes/spice_of_life_dark.php +++ b/themes/spice_of_life_dark.php @@ -15,8 +15,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } diff --git a/themes/spice_of_life_lite.php b/themes/spice_of_life_lite.php index db5c3f3e..ea520c15 100755 --- a/themes/spice_of_life_lite.php +++ b/themes/spice_of_life_lite.php @@ -15,8 +15,7 @@ */ /** Prevent direct script loading */ -if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) || - (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) { +if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) { die(); } -- 2.25.1