Save a few lines of code, don't show 0 in month list
git-svn-id: http://svn.automattic.com/wordpress/trunk@3724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b33778b079
commit
b71ff716ab
|
@ -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";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -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; */
|
||||
|
|
Loading…
Reference in New Issue