Save a few lines of code, don't show 0 in month list

git-svn-id: https://develop.svn.wordpress.org/trunk@3724 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2006-04-19 08:51:01 +00:00
parent 8658f214f8
commit 3bb5dc8012
2 changed files with 10 additions and 6 deletions

View File

@ -91,17 +91,17 @@ if ( count($arc_result) ) { ?>
<select name='m'>
<?php
foreach ($arc_result as $arc_row) {
$arc_year = $arc_row->yyear;
$arc_month = $arc_row->mmonth;
$arc_month = zeroise($arc_month, 2);
if ( $arc_row->yyear == 0 )
continue;
$arc_row->mmonth = zeroise($arc_row->mmonth, 2);
if( isset($_GET['m']) && $arc_year . $arc_month == (int) $_GET['m'] )
if( isset($_GET['m']) && $arc_row->yyear . $arc_row->mmonth == (int) $_GET['m'] )
$default = 'selected="selected"';
else
$default = null;
echo "<option $default value=\"" . $arc_year . $arc_month . '">';
echo $wp_locale->get_month($arc_month) . " $arc_year";
echo "<option $default value='$arc_row->yyear$arc_row->mmonth'>";
echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
echo "</option>\n";
}
?>

View File

@ -729,6 +729,10 @@ table .vers, table .name {
float: left;
}
#ajax-response {
padding: .5em;
}
/* A handy div class for hiding controls.
Some browsers will disable them when you
set display:none; */