Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Dav999 on July 11, 2017, 11:06:23 AM

Title: [2.0.14] Theme selection page displays ";vrt=X" if theme has selectable variants
Post by: Dav999 on July 11, 2017, 11:06:23 AM
If a theme has selectable variants (for example Golove (https://custom.simplemachines.org/themes/index.php?lemma=2724), or my modified testing version of Core in the image below), the displayed name of the theme contains ;vrt=(name) on the theme selection page, which seems to have accidentally been added to the link text instead of the link:




The cause can be found on this line in Themes.template.php:
                    <a href="', $scripturl, '?action=theme;sa=pick;u=', $context['current_member'], ';th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $theme['name'], (!empty($theme['variants']) ? ';vrt=' . $theme['selected_variant'] : ''), '</a>
I'm guessing it should have been this instead:
                    <a href="', $scripturl, '?action=theme;sa=pick;u=', $context['current_member'], ';th=', $theme['id'], ';', $context['session_var'], '=', $context['session_id'], (!empty($theme['variants']) ? ';vrt=' . $theme['selected_variant'] : ''), '">', $theme['name'], '</a>