Browse Source

Admins should be able to change variants even if the function is disabled

Signed-off-by: emanuele <[email protected]>
emanuele 11 years ago
parent
commit
60db1cdc3a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Sources/Themes.php

+ 1 - 1
Sources/Themes.php

@@ -1224,7 +1224,7 @@ function PickTheme()
 		$context['available_themes'][$id_theme]['description'] = $txt['theme_description'];
 
 		// Are there any variants?
-		if (file_exists($theme_data['theme_dir'] . '/index.template.php') && empty($theme_data['disable_user_variant']))
+		if (file_exists($theme_data['theme_dir'] . '/index.template.php') && (empty($theme_data['disable_user_variant']) || allowedTo('admin_forum'))
 		{
 			$file_contents = implode('', file($theme_data['theme_dir'] . '/index.template.php'));
 			if (preg_match('~\$settings\[\'theme_variants\'\]\s*=(.+?);~', $file_contents, $matches))