*** include/compiler.inc
--- include/compiler.inc 2005-10-11 10:30:52.846369683 -0600
***************
*** 238,245 ****
$ret .= "' : '' ) .'";
break;
- case 'ROOT':
case 'FULL_ROOT':
case 'THEME_ROOT':
case 'THEME_IMAGE_ROOT':
$ret .= $GLOBALS['__COMPILER__'][$tag];
--- 238,249 ----
$ret .= "' : '' ) .'";
break;
case 'FULL_ROOT':
+ if ($GLOBALS['SITES_DIR']) {
+ $ret .= '\'.$GLOBALS[\'WWW_ROOT\'].\'';
+ break;
+ }
+ case 'ROOT':
case 'THEME_ROOT':
case 'THEME_IMAGE_ROOT':
$ret .= $GLOBALS['__COMPILER__'][$tag];
***************
*** 584,590 ****
--- 588,598 ----
$cmpl =& $GLOBALS['__COMPILER__'];
$cmpl['ROOT'] = 'index.php';
+ if ($GLOBALS['SITES_DIR']) {
+ $cmpl['FULL_ROOT'] = '\'.$GLOBALS[\'WWW_ROOT\'].\'';
+ } else {
$cmpl['FULL_ROOT'] = $GLOBALS['WWW_ROOT']{strlen($GLOBALS['WWW_ROOT']) - 1} == '/' ? $GLOBALS['WWW_ROOT'] : $GLOBALS['WWW_ROOT'].'/';
+ }
$cmpl['THEME_ROOT'] = 'theme/' . $tname;
$cmpl['THEME_ROOT_DISK'] = $GLOBALS['WWW_ROOT_DISK'].'theme/'.$tname;
***************
*** 765,777 ****
if (!$files) {
exit("Failed to find help files inside '{$src}'");
}
foreach ($files as $file) {
$de = basename($file);
if (!($fp = fopen($path . $de, 'wb'))) {
exit('Failed to write to: '.$path . $de.'
');
}
! fwrite($fp, str_replace(array('{ROOT}', '{FULL_ROOT}'),
! array($rp, $GLOBALS['WWW_ROOT']),
file_get_contents($file))
);
fclose($fp);
--- 773,792 ----
if (!$files) {
exit("Failed to find help files inside '{$src}'");
}
+
+ $subs = array('{ROOT}'=>$rp,
+ '{FULL_ROOT}'=>$GLOBALS['WWW_ROOT']);
+
+ if ($GLOBALS['SITES_DIR']) {
+ $subs['{FULL_ROOT}'] = '\'.$GLOBALS[\'WWW_ROOT\'].\'';
+ }
+
foreach ($files as $file) {
$de = basename($file);
if (!($fp = fopen($path . $de, 'wb'))) {
exit('Failed to write to: '.$path . $de.'
');
}
! fwrite($fp, str_replace(array_keys($subs),array_values($subs),
file_get_contents($file))
);
fclose($fp);