No .*Admin themes appear in the admin

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045244
This commit is contained in:
skewed
2010-01-11 20:05:40 +00:00
parent 1d17afd9f2
commit 7c4ea5f328

View File

@@ -83,7 +83,9 @@ namespace Orchard.Core.Themes.Services {
public IEnumerable<ITheme> GetInstalledThemes() {
List<ITheme> themes = new List<ITheme>();
foreach (var descriptor in _extensionManager.AvailableExtensions()) {
if (String.Equals(descriptor.ExtensionType, "Theme", StringComparison.OrdinalIgnoreCase)) {
//todo: (heskew) filter out Admin themes in a different manner - eventually we'll need a way to select the admin theme so there should be a clear separation
if (String.Equals(descriptor.ExtensionType, "Theme", StringComparison.OrdinalIgnoreCase)
&& !(descriptor.Name.EndsWith("Admin", StringComparison.OrdinalIgnoreCase))) {
Theme theme = new Theme {
Author = descriptor.Author ?? String.Empty,
Description = descriptor.Description ?? String.Empty,