открыть xs_cache.php
найти
заменить на
найти
PHP:
//
// get list of installed styles
//
$style_rowset = array(
0 => array(
'themes_id' => 1,
'template_name' => 'default',
'style_name' => 'default',
),
1 => array(
'themes_id' => 2,
'template_name' => $bb_cfg['tpl_name'],
'style_name' => $bb_cfg['tpl_name'],
),
);
$template->set_filenames(array('body' => XS_TPL_PATH . 'cache.tpl'));
$prev_id = -1;
$prev_tpl = '';
$style_names = array();
$j = 0;
for($i=0; $i<count($style_rowset); $i++)
{
$item = $style_rowset[$i];
if($item['template_name'] === $prev_tpl)
{
$style_names[] = htmlspecialchars($item['style_name']);
}
else
{
if($prev_id > 0)
{
$str = implode('<br />', $style_names);
$str2 = urlencode($prev_tpl);
$row_class = $xs_row_class[$j % 2];
$j++;
$template->assign_block_vars('styles', array(
'ROW_CLASS' => $row_class,
'TPL' => $prev_tpl,
'STYLES' => $str,
'U_CLEAR' => "xs_cache.php?clear={$str2}&sid={$userdata['session_id']}",
'U_COMPILE' => "xs_cache.php?compile={$str2}&sid={$userdata['session_id']}",
)
);
}
$prev_id = $item['themes_id'];
$prev_tpl = $item['template_name'];
$style_names = array(htmlspecialchars($item['style_name']));
}
}
if($prev_id > 0)
{
$str = implode('<br />', $style_names);
$str2 = urlencode($prev_tpl);
$row_class = $xs_row_class[$j % 2];
$j++;
$template->assign_block_vars('styles', array(
'ROW_CLASS' => $row_class,
'TPL' => $prev_tpl,
'STYLES' => $str,
'U_CLEAR' => "xs_cache.php?clear={$str2}&sid={$userdata['session_id']}",
'U_COMPILE' => "xs_cache.php?compile={$str2}&sid={$userdata['session_id']}",
)
);
}
$template->assign_vars(array(
'U_CLEAR_ALL' => "xs_cache.php?clear=&sid={$userdata['session_id']}",
'U_COMPILE_ALL' => "xs_cache.php?compile=&sid={$userdata['session_id']}",
'RESULT' => '<br /><br />' . $data
)
);
$template->pparse('body');
xs_exit();
заменить на
PHP:
//
// get list of installed styles
//
$template->set_filenames(array('body' => XS_TPL_PATH . 'cache.tpl'));
$prev_id = -1;
$prev_tpl = '';
$style_names = array();
$j = 0;
foreach ($bb_cfg['tpl_name'] as $tpl_name)
{
if($tpl_name === $prev_tpl)
{
$style_names[] = htmlspecialchars($tpl_name);
}
else
{
if($prev_id > 0)
{
$str = implode('<br />', $style_names);
$str2 = urlencode($prev_tpl);
$row_class = $xs_row_class[$j % 2];
$j++;
$template->assign_block_vars('styles', array(
'ROW_CLASS' => $row_class,
'TPL' => $prev_tpl,
'STYLES' => $str,
'U_CLEAR' => "xs_cache.php?clear={$str2}&sid={$userdata['session_id']}",
'U_COMPILE' => "xs_cache.php?compile={$str2}&sid={$userdata['session_id']}",
));
}
$prev_id = array($tpl_name);
$prev_tpl = $tpl_name;
$style_names = array(htmlspecialchars($tpl_name));
}
}
if($prev_id > 0)
{
$str = implode('<br />', $style_names);
$str2 = urlencode($prev_tpl);
$row_class = $xs_row_class[$j % 2];
$j++;
$template->assign_block_vars('styles', array(
'ROW_CLASS' => $row_class,
'TPL' => $prev_tpl,
'STYLES' => $str,
'U_CLEAR' => "xs_cache.php?clear={$str2}&sid={$userdata['session_id']}",
'U_COMPILE' => "xs_cache.php?compile={$str2}&sid={$userdata['session_id']}",
));
}
$template->assign_vars(array(
'U_CLEAR_ALL' => "xs_cache.php?clear=&sid={$userdata['session_id']}",
'U_COMPILE_ALL' => "xs_cache.php?compile=&sid={$userdata['session_id']}",
'RESULT' => '<br /><br />' . $data
)
);
$template->pparse('body');
xs_exit();