cvs: phpweb /include layout.inc
| From: | Gabor Hojtsy | Date: | Sat, 05 Jan 2002 11:29:41 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-8103@lists.php.net to get a copy of this message | ||
goba Sat Jan 5 06:29:41 2002 EDT
Modified files:
/phpweb/include layout.inc
Log:
Try to finally fix mirrors with multiple hostnames.
Work with host name currently in use, so move whole test
to JavaScript
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.63 phpweb/include/layout.inc:1.64
--- phpweb/include/layout.inc:1.63 Thu Jan 3 01:51:22 2002
+++ phpweb/include/layout.inc Sat Jan 5 06:29:41 2002
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.63 2002/01/03 06:51:22 mk Exp $ */
+/* $Id: layout.inc,v 1.64 2002/01/05 11:29:41 goba Exp $ */
# spacer()
# print a IMG tag for a sized spacer GIF
@@ -307,10 +307,12 @@
<script language="javascript">
<!--
function gotomirror(form) {
- url = form.country.options[form.country.selectedIndex].value;
- if (url != '<?php echo $MYSITE; ?>') {
- current = window.location.href;
- window.location.href = url+current.substr(<?echo strpos(substr($MYSITE, 7),
"/")?>);
+ mirror = form.country.options[form.country.selectedIndex].value;
+ if (mirror != 'http://' + window.location.hostname
+ '/') {
+ window.location.href = mirror +
+ window.location.pathname +
+ window.location.hash +
+ window.location.search);
}
return false;
}