Incorrect CSS settings [message #7] |
Fri, 14 April 2006 02:08 |
ljkbrost
Messages: 59 Registered: April 2006
|
Member |
|
|
I run my apache server on http://localhost:8080 and I found a problem with the XML that gets sent to the client. It looks like the system is not sending the port for the machine.
<cssfiles> <filename>HTTP://localhost/radicore/style_default.css</filename>
<filename>HTTP://localhost/radicore/menu/style_custom.css</filename>
</cssfiles>
I have traced the problem to include.xml.php?.inc inside of the setCSSfiles(...) function. When building the filename values the string building function uses $_SERVER['SERVER_NAME'] when it should use $_SERVER['HTTP_HOST'].
Altering the code to the following resolved my problems:
// if no custom stylesheet is specified use 'style_custom.css' in local directory
if (empty($css_files)) {
$css_files[] = 'HTTP://' .$_SERVER['HTTP_HOST'] .dirname($_SERVER['PHP_SELF']) .'/style_custom.css';
} // if
// prepend the default stylesheet name from base directory
$dir = getParentDIR();
if (!empty($_SERVER['HTTPS'])) {
$default_css = 'HTTP://' .$GLOBALS['https_server'] .$GLOBALS['https_server_suffix'] .$dir .'/style_default.css';
} else {
$default_css = 'HTTP://' .$_SERVER['HTTP_HOST'] .$dir .'/style_default.css';
} // if
Cheers,
Kyle Brost
----
|
|
|
|