mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 12:35:03 +00:00
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'>
|
<select name='m'>
|
||||||
<?php
|
<?php
|
||||||
foreach ($arc_result as $arc_row) {
|
foreach ($arc_result as $arc_row) {
|
||||||
$arc_year = $arc_row->yyear;
|
if ( $arc_row->yyear == 0 )
|
||||||
$arc_month = $arc_row->mmonth;
|
continue;
|
||||||
$arc_month = zeroise($arc_month, 2);
|
$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"';
|
$default = 'selected="selected"';
|
||||||
else
|
else
|
||||||
$default = null;
|
$default = null;
|
||||||
|
|
||||||
echo "<option $default value=\"" . $arc_year . $arc_month . '">';
|
echo "<option $default value='$arc_row->yyear$arc_row->mmonth'>";
|
||||||
echo $wp_locale->get_month($arc_month) . " $arc_year";
|
echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
|
||||||
echo "</option>\n";
|
echo "</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -729,6 +729,10 @@ table .vers, table .name {
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ajax-response {
|
||||||
|
padding: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
/* A handy div class for hiding controls.
|
/* A handy div class for hiding controls.
|
||||||
Some browsers will disable them when you
|
Some browsers will disable them when you
|
||||||
set display:none; */
|
set display:none; */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user