Avoid using track vars when not necessary.
authorpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 4 Oct 2000 14:17:50 +0000 (14:17 +0000)
committerpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 4 Oct 2000 14:17:50 +0000 (14:17 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@776 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/strings.php

index fa455664d023938a249559f2238efbf244dedf9b..7e6216c6a4ef45c4e9b24499b233837127ad09fd 100644 (file)
       #
       #   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, '/'));
         $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);
         }
       }