Skip to content

Commit

Permalink
Don't call theme::get_info() on themes that don't have a theme.info. …
Browse files Browse the repository at this point in the history
…Fixes #896.
  • Loading branch information
bharat committed Nov 21, 2009
1 parent befb824 commit 4c5e200
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/gallery/controllers/admin_themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ public function index() {
private function _get_themes() {
$themes = array();
foreach (scandir(THEMEPATH) as $theme_name) {
if ($theme_name[0] == ".") {
continue;
}
if (file_exists(THEMEPATH . "$theme_name/theme.info")) {
if ($theme_name[0] == ".") {
continue;
}

$themes[$theme_name] = theme::get_info($theme_name);
$themes[$theme_name] = theme::get_info($theme_name);
}
}
return $themes;
}
Expand Down

0 comments on commit 4c5e200

Please sign in to comment.