Home »
FUDforum Development »
Bug Reports »
Possible bug in compiler.inc
Possible bug in compiler.inc [message #30728] |
Fri, 10 March 2006 21:24 |
Abraxa
Messages: 72 Registered: August 2004 Location: Germany
Karma: 0
|
Member |
|
|
Heya =)
In a custom CSS template I was using {FULL_ROOT}{THEME_IMAGE_ROOT}/blabla.gif as a property - which worked with 2.6.3 but isn't working with 2.7.4 anymore. I was looking into why that is and saw that now FULL_ROOT isn't an URL anymore but instead just a PHP variable reference to WWW_ROOT.
So I looked into compiler.inc to find an alternative to FULL_ROOT that I could use and I found the following:
in compile_all():
$cmpl =& $GLOBALS['__COMPILER__'];
$cmpl['FULL_ROOT'] = $GLOBALS['WWW_ROOT']{strlen($GLOBALS['WWW_ROOT']) - 1} == '/' ? $GLOBALS['WWW_ROOT'] : $GLOBALS['WWW_ROOT'].'/';
in resolve_sections():
case 'FULL_ROOT':
$ret .= "'.\$GLOBALS['WWW_ROOT'].'";
break;
case 'ROOT':
case 'THEME_ROOT':
case 'THEME_IMAGE_ROOT':
$ret .= $GLOBALS['__COMPILER__'][$tag];
break;
Since $GLOBALS['__COMPILER__']['FULL_ROOT'] gets set in compile_all()... why isn't it used just like ROOT, THEME_ROOT and THEME_IMAGE_ROOT?
Did you merely forget to make the change for FULL_ROOT as well or is there a reason why you're replacing FULL_ROOT by a reference of WWW_ROOT instead of using $GLOBALS['__COMPILER__']['FULL_ROOT']?
-Soeren
|
|
|
Re: Possible bug in compiler.inc [message #30749 is a reply to message #30728] |
Sun, 12 March 2006 17:30 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The stylesheet was modified to reference a partial path rather then a full one in 2.7 series. The change was done to simplify changes in the URL, where now you can update GLOBALS.php and move to another domain without having to rebuild the theme. It also gives you the ability to easily make the forum accessible through multiple domains.
FUDforum Core Developer
|
|
|
Goto Forum:
Current Time: Sun Nov 10 05:16:14 GMT 2024
Total time taken to generate the page: 0.02592 seconds