[pLog-svn] r2434 - plog/branches/plog-1.0.2/class/net/http

oscar at devel.plogworld.net oscar at devel.plogworld.net
Thu Sep 1 21:20:36 GMT 2005


Author: oscar
Date: 2005-09-01 21:20:36 +0000 (Thu, 01 Sep 2005)
New Revision: 2434

Modified:
   plog/branches/plog-1.0.2/class/net/http/httpvars.class.php
Log:
implemented the fix described here: http://bugs.plogworld.net/view.php?id=676 


Modified: plog/branches/plog-1.0.2/class/net/http/httpvars.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/net/http/httpvars.class.php	2005-09-01 20:37:54 UTC (rev 2433)
+++ plog/branches/plog-1.0.2/class/net/http/httpvars.class.php	2005-09-01 21:20:36 UTC (rev 2434)
@@ -272,10 +272,16 @@
             } else {
                 $protocol = 'https://';
             }
-            $host      = $serverVars["HTTP_HOST"];
+            //$host      = $serverVars["HTTP_HOST"];
+            $host = $serverVars["SERVER_NAME"];
             $scriptUrl = $serverVars["PHP_SELF"];
-
-            return $protocol . $host . $scriptUrl;
+            $port = $serverVars["SERVER_PORT"];
+            if( $port == 80 || $post == 443 )
+				$baseUrl = $protocol . $host . $scriptUrl;
+			else
+				$baseUrl = $protocol . $host . ":" . $port . $scriptUrl;
+				
+            return( $baseUrl );
         }
     }
 ?>




More information about the pLog-svn mailing list