Permalink
Browse files

Check for irregular themes, closes #278.

  • Loading branch information...
1 parent 65d4a5f commit 25e8deac4e58dd60842b13c34e9ea1e4259e27ce Phaidon committed Apr 28, 2012
Showing with 4 additions and 2 deletions.
  1. +3 −1 src/lib/util/ThemeUtil.php
  2. +1 −1 src/system/Theme/templates/theme_user_main.tpl
View
4 src/lib/util/ThemeUtil.php
@@ -129,7 +129,9 @@ public static function getAllThemes($filter = self::FILTER_ALL, $state = self::S
if (file_exists('themes/'.$theme.'/templates/master.tpl')) {
$themesarray[$key][$theme]['structure'] = true;
} else {
- LogUtil::registerError(__f('The structure of the theme %s is not valid!', $values['name']));
+ if (FormUtil::getPassedValue('type', 'POST') == 'admin') {
+ LogUtil::registerError(__f('The structure of the theme %s is not valid!', $values['name']));
+ }
$themesarray[$key][$theme]['structure'] = false;
}
}
View
2 src/system/Theme/templates/theme_user_main.tpl
@@ -15,7 +15,7 @@
<h3>{gt text="Themes list"}</h3>
<div id="themes_list" class="z-clearfix">
{foreach from=$themes item=theme}
- {if $theme.name neq $currenttheme.name}
+ {if $theme.name neq $currenttheme.name and $theme.structure}
<dl class="theme_item">
<dt><strong>{$theme.displayname}</strong></dt>
<dt>

0 comments on commit 25e8dea

Please sign in to comment.