From 00421cb66045486941e2e3ba5e295e2eb7abf873 Mon Sep 17 00:00:00 2001 From: pallo Date: Wed, 4 Oct 2000 14:17:50 +0000 Subject: [PATCH] Avoid using track vars when not necessary. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@776 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/strings.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/strings.php b/functions/strings.php index fa455664..7e6216c6 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -203,7 +203,7 @@ # # http://www.myhost.com/squirrelmail/src/login.php - global $PHP_SELF, $SERVER_NAME, $HTTPS, $HTTP_HOST, $HTTP_SERVER_VARS; + global $PHP_SELF, $SERVER_NAME, $HTTPS, $HTTP_HOST, $SERVER_PORT; // Get the path $path = substr($PHP_SELF, 0, strrpos($PHP_SELF, '/')); @@ -214,9 +214,10 @@ $proto = "https://"; } - if ($HTTP_SERVER_VARS['SERVER_PORT']) { - if ($HTTP_SERVER_VARS['SERVER_PORT'] != 80) { - $port = ':' . $HTTP_SERVER_VARS['SERVER_PORT']; + $port = ""; + if (isset($SERVER_PORT)) { + if ($SERVER_PORT != 80) { + $port = sprintf(':%d', $SERVER_PORT); } } -- 2.25.1