diff --git a/wp-blog-header.php b/wp-blog-header.php index 7cfa9a183..07234917b 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -227,7 +227,7 @@ if (empty($orderby)) { if ((!$whichcat) && (!$m) && (!$p) && (!$w) && (!$s) && empty($poststart) && empty($postend)) { if ($what_to_show == 'posts') { $limits = ' LIMIT '.$posts_per_page; - } elseif ($what_to_show == 'days') { + } elseif ($what_to_show == 'days' && empty($monthnum) && empty($year) && empty($day)) { $lastpostdate = get_lastpostdate(); $lastpostdate = mysql2date('Y-m-d 00:00:00',$lastpostdate); $lastpostdate = mysql2date('U',$lastpostdate); diff --git a/wp-includes/vars.php b/wp-includes/vars.php index c474a5514..7ee3e4fd1 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -262,10 +262,7 @@ uksort($wpsmiliestrans, 'smiliescmp'); # generates smilies' search & replace arrays foreach($wpsmiliestrans as $smiley => $img) { $wp_smiliessearch[] = $smiley; - $smiley_masked = ''; - for ($i = 0; $i < strlen($smiley); $i = $i + 1) { - $smiley_masked .= substr($smiley, $i, 1).chr(160); - } + $smiley_masked = str_replace(' ', '', $smiley); $wp_smiliesreplace[] = " $smiley_masked"; }