cvs: phpweb /include layout.inc
| From: | Gabor Hojtsy | Date: | Thu, 14 Aug 2003 09:20:00 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20252@lists.php.net to get a copy of this message | ||
goba Thu Aug 14 05:20:00 2003 EDT
Modified files:
/phpweb/include layout.inc
Log:
Fix for silly IE which thinks that an empty base can be real...
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.181 phpweb/include/layout.inc:1.182
--- phpweb/include/layout.inc:1.181 Wed Aug 13 14:40:04 2003
+++ phpweb/include/layout.inc Thu Aug 14 05:20:00 2003
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.181 2003/08/13 18:40:04 goba Exp $ */
+/* $Id: layout.inc,v 1.182 2003/08/14 09:20:00 goba Exp $ */
// Set the static content root differently on php.net
$_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ?
@@ -57,6 +57,9 @@
if (isset($EXPL_LANG)) {
$lang_input = "\n <input type=\"hidden\" name=\"lang\"
value=\"$EXPL_LANG\" />";
} else { $lang_input = ''; }
+ if (!empty($_SERVER['BASE_HREF'])) {
+ $base = "\n <base href=\"{$_SERVER['BASE_HREF']}\" />";
+ } else { $base = ''; }
print <<<END_HEADER
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -66,8 +69,7 @@
<title>PHP{$title}</title>
<style type="text/css">@import
url("{$_SERVER['STATIC_ROOT']}/sitewide.css");</style>
<link rel="shortcut icon"
href="{$_SERVER['STATIC_ROOT']}/favicon.ico" />
- <script type="text/javascript"
src="{$_SERVER['STATIC_ROOT']}/userprefs.js"></script>
- <base href="{$_SERVER['BASE_HREF']}" />
+ <script type="text/javascript"
src="{$_SERVER['STATIC_ROOT']}/userprefs.js"></script>$base
</head>
<body onload="{$onload}">