Skip to content

Commit

Permalink
Check for irregular themes, closes #278.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phaidon authored and Phaidon committed Apr 28, 2012
1 parent 65d4a5f commit 25e8dea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/lib/util/ThemeUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/system/Theme/templates/theme_user_main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 25e8dea

Please sign in to comment.