[fixup/stylechanger] Use link to controller file

It's not perfect but makes sure the links work right now.

B3P-126
This commit is contained in:
Marc Alexander
2013-03-03 18:14:38 +01:00
parent ed642b9321
commit 895546f502

View File

@@ -61,13 +61,13 @@ class portal_stylechanger_module
while ($row = $db->sql_fetchrow($result))
{
$style = request_var('style', 0);
if($style)
if (!empty($style))
{
$url = str_replace('style=' . $style, 'style=' . $row['style_id'], append_sid("{$phpbb_root_path}portal.$phpEx"));
$url = str_replace('style=' . $style, 'style=' . $row['style_id'], append_sid("{$phpbb_root_path}app.$phpEx", 'controller=portal'));
}
else
{
$url = append_sid("{$phpbb_root_path}portal.$phpEx", 'style=' . $row['style_id']);
$url = append_sid("{$phpbb_root_path}app.$phpEx", 'controller=portal&style=' . $row['style_id']);
}
++$style_count;
$style_select .= '<option value="' . $url . '"' . ($row['style_id'] == $user->style['style_id'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($row['style_name']) . '</option>';