Bail if no themes found. see #8652

git-svn-id: https://develop.svn.wordpress.org/trunk@10675 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-03-01 19:38:42 +00:00
parent e2cabb1d19
commit aaef67fb9b
1 changed files with 7 additions and 0 deletions

View File

@ -381,10 +381,17 @@ function display_themes($themes, $page = 1, $totalpages = 1) {
echo "\t\t<div class='tablenav-pages'>$page_links</div>"; echo "\t\t<div class='tablenav-pages'>$page_links</div>";
?> <br class="clear" /> ?> <br class="clear" />
</div> </div>
<?php
if ( empty($themes) ) {
_e('No themes found');
return;
}
?>
<table id="availablethemes" cellspacing="0" cellpadding="0"> <table id="availablethemes" cellspacing="0" cellpadding="0">
<?php <?php
$in_column = 0; $in_column = 0;
$rows = ceil(count($themes) / 3); $rows = ceil(count($themes) / 3);
$table = array();
$i = 0; $i = 0;
for ( $row = 1; $row <= $rows; $row++ ) { for ( $row = 1; $row <= $rows; $row++ ) {
for ( $col = 1; $col <= 3; $col++ ) { for ( $col = 1; $col <= 3; $col++ ) {